Exemple #1
0
 void PlayAnimation(ChallengerAction action)
 {
     if (action != CurrentAction)
     {
         animator.SetTrigger(action.ToString().ToLower());
     }
 }
Exemple #2
0
        void Move(Vector3 targetPos, Vector3 direction, float speed)
        {
            StopMoveAction();
            PlayAnimation(ChallengerAction.Move);
            CurrentAction = ChallengerAction.Move;
            var coroutine = StartCoroutine(MoveAction(targetPos, direction, speed));

            actions.Add(coroutine, CurrentAction);
        }
Exemple #3
0
 void Start()
 {
     CurrentAction = ChallengerAction.Idle;
     BagUI.Init();
     foreach (var item in ress)
     {
         BagUI.AddRes(item);
     }
 }
Exemple #4
0
 void ActionEnd()
 {
     PlayAnimation(ChallengerAction.Idle);
     CurrentAction = ChallengerAction.Idle;
 }