mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
corrections de bogues d'intégration
This commit is contained in:
parent
4d6094b40f
commit
6c11a27e46
@ -7,21 +7,21 @@ public class Asteroid : MonoBehaviour
|
||||
public float speed;
|
||||
public float step;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
// Use this for initialization
|
||||
public void Start()
|
||||
{
|
||||
speed = Random.Range(0.9F, 3F);
|
||||
// print(speed);
|
||||
center = new Vector3(0, 0);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
// Update is called once per frame
|
||||
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);
|
||||
|
||||
@ -62,8 +62,8 @@ public class Astronaut : MonoBehaviour {
|
||||
private float walkTime = 0;
|
||||
private int nextStep = 1;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
// Use this for initialization
|
||||
public void Start () {
|
||||
if (!planet)
|
||||
{
|
||||
planet = FindObjectOfType<PlanetManager>();
|
||||
@ -104,8 +104,8 @@ public class Astronaut : MonoBehaviour {
|
||||
return Mathf.Repeat(num + limit, limit);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
// Update is called once per frame
|
||||
public void Update () {
|
||||
float delta = Time.deltaTime;
|
||||
|
||||
if (!grounded)
|
||||
|
||||
@ -9,8 +9,8 @@ public class AstronautController : MonoBehaviour {
|
||||
|
||||
public int PlayerNumber;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
// Use this for initialization
|
||||
public void Start()
|
||||
{
|
||||
InputManager.Instance.PushActiveContext("Gameplay", PlayerNumber);
|
||||
InputManager.Instance.AddCallback(PlayerNumber, HandlePlayerAxis);
|
||||
|
||||
@ -6,22 +6,22 @@ public class Earthquake : MonoBehaviour {
|
||||
const int gaugeMax=100;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
public void Start()
|
||||
{
|
||||
gaugeLevel = 0;
|
||||
InvokeRepeating("FillGauge", 1, 1F);
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
// Update is called once per frame
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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++)
|
||||
@ -36,15 +37,15 @@ public class PlanetManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
// Update is called once per frame
|
||||
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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user