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