예제 #1
0
 // 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;
     }
 }
예제 #2
0
 // 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;
     }
 }