Esempio n. 1
0
    private void GetData()
    {
        List <int> Data = Controller.GetData(
            new List <bool>
        {
            endAnimAtack
        });

        State = Data[0];
        if (State != (int)MobsController.StateMobs.Atack)
        {
            StateMag = (MobsController.StateMobs)State;
        }
    }
Esempio n. 2
0
 private void CheckAtackMode()
 {
     if (State == (int)MobsController.StateMobs.Atack)
     {
         if (StateMag != MobsController.StateMobs.Atack)
         {
             timeLastAtackPlayer = Time.time;
         }
         StateMag = MobsController.StateMobs.Atack;
         if (Time.time - timeLastAtackPlayer > timePlayerAtack)
         {
             AtackVoid();
             timeLastAtackPlayer = Time.time;
             endAnimAtack        = false;
         }
     }
 }
Esempio n. 3
0
 private void CheckAtackMode()
 {
     if (State == (int)MobsController.StateMobs.Atack)
     {
         if (Time.time - timeLastAtackPlayer > timePlayerAtack)
         {
             Debug.Log("Time");
             StateSceleton = MobsController.StateMobs.Atack;
             anim.Play("SceletonAtack");
             timeLastAtackPlayer = Time.time;
             endAnimAtack        = false;
         }
         else
         {
             StateSceleton = MobsController.StateMobs.Idle;
         }
         AtackVoid();
     }
 }
Esempio n. 4
0
 public void endAnimationAttack()
 {
     StateMag     = MobsController.StateMobs.Idle;
     endAnimAtack = true;
 }