예제 #1
0
 public void SetDefaultAnimation()
 {
     if (myAnimator != null)
     {
         if (DefaultAnimationActionPrefab != null)
         {
             CharAction defaultAnimationAction = Instantiate(DefaultAnimationActionPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity) as CharAction;
             defaultAnimationAction.transform.SetParent(transform, false);
             defaultAnimationAction.MyAnimator = myAnimator;
             defaultAnimationAction.MakeAction();
         }
         else
         {
             AnimationUtilities.SetTriggerIfExists("Idle", myAnimator);
         }
     }
 }
예제 #2
0
 public override void MakeAction()
 {
     AnimationUtilities.SetTriggerIfExists("Idle", MyAnimator);
     Destroy(gameObject);
 }