Example #1
0
 void PlayAnimation(ChallengerAction action)
 {
     if (action != CurrentAction)
     {
         animator.SetTrigger(action.ToString().ToLower());
     }
 }
Example #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);
        }
Example #3
0
 void Start()
 {
     CurrentAction = ChallengerAction.Idle;
     BagUI.Init();
     foreach (var item in ress)
     {
         BagUI.AddRes(item);
     }
 }
Example #4
0
 void ActionEnd()
 {
     PlayAnimation(ChallengerAction.Idle);
     CurrentAction = ChallengerAction.Idle;
 }