Example #1
0
 public static void Bite(DataObjectDino dino)
 {
     dino.transform.GetChild(0).gameObject.SetActive(true);
     dino.StartCoroutine(ReturnEat(dino));
     dino.StartCoroutine(BiteDelay(dino));
     BehaviourPhysics.Force(dino.gameObject, Vector2.right * dino.gameObject.transform.localScale.x, 50f);
     BehaviourAnimation.Play(dino.gameObject, "Bite_Right_Normal");
     BehaviourSound.Play("dinoAttack");
 }
Example #2
0
 public ControllerDino(GameObject gameObject, Slider barradefome, int Lifes)
 {
     dataObjectEnemy     = gameObject.GetComponent<DataObjectEnemy>();
     dataDino            = gameObject.GetComponent<DataObjectDino>();
     dataDino.Controller = this;
     dataDino.IsJumping  = false;
     dataDino.Lifes = Lifes;
     for (int i = 0;i < dataDino.Lifes;i++)
     {
         RestoreLife();
     }
     dataDino.StartCoroutine(ReduceFome(barradefome));
     dataDino.StartCoroutine(FomeDamage());
 }
Example #3
0
 public static void Eat(DataObjectDino dino)
 {
     dino.IsEating = true;
     dino.transform.GetChild(0).gameObject.SetActive(true);
     dino.StartCoroutine(ReturnEat(dino));
     BehaviourAnimation.Play(dino.gameObject, "Bite_Right_Normal");
     BehaviourSound.Play("dinoAttack");
 }
Example #4
0
 public static void Hurt(DataObjectDino dino)
 {
     dino.Lifes--;
     BehaviourAnimation.Trigger(dino.gameObject, "Hurt");
     dino.StartCoroutine(dino.ColliderDisable());
 }