Ejemplo n.º 1
0
 void Start()
 {
     rigidBody2D = GetComponent<Rigidbody2D>();
     dino = GetComponentInParent<Dino>();
     switch(dino.player)
     {
         case Dino.Player.Player1:
             enemyRigidBody = GameObject.Find("Red_Body").GetComponent<Rigidbody2D>();
             //pushForce *= 1;
             break;
         case Dino.Player.Player2:
             enemyRigidBody = GameObject.Find("Blue_Body").GetComponent<Rigidbody2D>();
             pushForce *= -1;
             break;
     }
     if(damage_toggle &&	(name.Contains("Head")
                      ||  name.Contains("Jaw")))
     {
         push_toggle = false;
     }
 }
Ejemplo n.º 2
0
 IEnumerator showSkeleton(Dino dino)
 {
     yield return new WaitForSeconds(0.5f);
     dino.showSkeleton();
 }
Ejemplo n.º 3
0
 private void setPlayerWin(Dino.Player player)
 {
     switch(player)
     {
         case Dino.Player.Player1:
             break;
         case Dino.Player.Player2:
             break;
     }
 }
Ejemplo n.º 4
0
        IEnumerator showSkeleton(Dino dino)
        {
            yield return(new WaitForSeconds(0.5f));

            dino.showSkeleton();
        }