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; } }
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; } } }
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(); } }
public void endAnimationAttack() { StateMag = MobsController.StateMobs.Idle; endAnimAtack = true; }