// Use this for initialization void Start() { // Récupère une référence au script AnimationCourse attaché au même GameObject ac = GetComponent <networked.AnimationCourse> (); rb = GetComponent <Rigidbody2D> (); if (this.transform.position.x > 0) { SpriteRenderer sr = GetComponent <SpriteRenderer> (); sr.color = orangeColor; sr.flipX = true; } }
// Use this for initialization void Start() { // Récupère une référence au script AnimationCourse attaché au même GameObject ac = GetComponent <networked.AnimationCourse> (); rb = GetComponent <Rigidbody2D> (); if (this.transform.position.x > 0) { SpriteRenderer sr = GetComponent <SpriteRenderer> (); sr.color = orangeColor; sr.flipX = true; } if (isLocalPlayer && rb != null) { GetComponent <CircleCollider2D>().radius = 0.28f; } }