corrections de bogues d'intégration

This commit is contained in:
Jean-Sébastien Gervais 2016-04-08 18:50:26 -04:00
parent 4d6094b40f
commit 6c11a27e46
6 changed files with 38 additions and 37 deletions

View File

@ -8,7 +8,7 @@ public class Asteroid : MonoBehaviour
public float step;
// Use this for initialization
void Start()
public void Start()
{
speed = Random.Range(0.9F, 3F);
// print(speed);
@ -16,12 +16,12 @@ public class Asteroid : MonoBehaviour
}
// Update is called once per frame
void Update () {
public void Update () {
MoveObject(center);
}
void MoveObject(Vector3 center)
public void MoveObject(Vector3 center)
{
step = speed * Time.deltaTime;
this.transform.position = Vector3.MoveTowards(transform.position, center, step);

View File

@ -63,7 +63,7 @@ public class Astronaut : MonoBehaviour {
private int nextStep = 1;
// Use this for initialization
void Start () {
public void Start () {
if (!planet)
{
planet = FindObjectOfType<PlanetManager>();
@ -105,7 +105,7 @@ public class Astronaut : MonoBehaviour {
}
// Update is called once per frame
void Update () {
public void Update () {
float delta = Time.deltaTime;
if (!grounded)

View File

@ -10,7 +10,7 @@ public class AstronautController : MonoBehaviour {
public int PlayerNumber;
// Use this for initialization
void Start()
public void Start()
{
InputManager.Instance.PushActiveContext("Gameplay", PlayerNumber);
InputManager.Instance.AddCallback(PlayerNumber, HandlePlayerAxis);

View File

@ -6,7 +6,7 @@ public class Earthquake : MonoBehaviour {
const int gaugeMax=100;
// Use this for initialization
void Start()
public void Start()
{
gaugeLevel = 0;
InvokeRepeating("FillGauge", 1, 1F);
@ -14,14 +14,14 @@ public class Earthquake : MonoBehaviour {
}
// Update is called once per frame
void Update () {
public void Update () {
}
/// <summary>
/// Actualiser l'affichage de la gauge
/// </summary>
void UpdateFixed()
public void UpdateFixed()
{
@ -32,7 +32,7 @@ public class Earthquake : MonoBehaviour {
/// <summary>
/// à être Appelé à chaque fois qu'on enfonce un plateau, le gage se remplis plus vite. (et par le temps)
/// </summary>
void FillGauge()
public void FillGauge()
{
if (gaugeLevel < gaugeMax)
{

View File

@ -10,6 +10,7 @@ public class PlanetManager : MonoBehaviour
public float TailleCartiersEnDegres = 0; //radian -> valeurs 0 a 360
public float CartierResetRatioSpeedFactor = 0.23f; //Entre 0.05 et 1 ou plus on aime que ca restore lentement, randomnly
public bool CartierResetRatioSpeedRandomize = true;
public bool CartierResetOverTime = true;
public float CartierMinRatio = 0.4f;
public float CartierMaxRatio = 2.0f;
public float CartierStepSize = 0.25f;
@ -17,7 +18,7 @@ public class PlanetManager : MonoBehaviour
public List<Wedge> wedges = new List<Wedge>();
// Use this for initialization
void Awake () {
public void Awake () {
TailleCartiersEnDegres = 360.0f / NbCartiers;
for(int i = 0; i < NbCartiers; i++)
@ -37,14 +38,14 @@ public class PlanetManager : MonoBehaviour
}
// Update is called once per frame
void Update () {
public void Update () {
}
void FixedUpdate()
public void FixedUpdate()
{
if (!this.CartierResetRatioSpeedRandomize) return;
if (!this.CartierResetOverTime) return;
//Ramener les plateforme vers leur position initiale 0;
foreach (var w in wedges)
@ -88,7 +89,7 @@ public class PlanetManager : MonoBehaviour
w.offset = w.offset - CartierStepSize;
if (w.offset < CartierMinRatio)
w.offset = 0.5f;
w.offset = CartierMinRatio;
w.sprite.transform.localScale = new Vector3(w.offset, w.offset, 1);
@ -99,7 +100,7 @@ public class PlanetManager : MonoBehaviour
v.offset = v.offset + CartierStepSize;
if (v.offset > CartierMaxRatio)
v.offset = 1.5f;
v.offset = CartierMaxRatio;
v.sprite.transform.localScale = new Vector3(v.offset, v.offset, 1);
}

View File

@ -9,7 +9,7 @@ public class testRotate : MonoBehaviour {
private float speed = 33.2f;
public bool check;
void Update()
public void Update()
{
if(Input.GetKeyDown("space") || Input.GetKey("s"))
{
@ -52,7 +52,7 @@ public class testRotate : MonoBehaviour {
/// Le player se déplace de gauche a droite en x et la valeur de x représente l'angle theta
/// saute en y
/// </summary>
void FixedUpdate()
public void FixedUpdate()
{
var theta = Time.realtimeSinceStartup * speed % 360.0f; // Position X du player = angle theta