示例#1
0
 private void Start()
 {
     spawnPos = transform.position;
     if (runner == null)
     {
         runner = CoroutineRunner.Instantiate("DisableAndRespawnHelper");
     }
 }
示例#2
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     if (resolveAttackRunner == null)
     {
         resolveAttackRunner = CoroutineRunner.Instantiate("ResolveAttackRunner");
         DontDestroyOnLoad(resolveAttackRunner);
     }
     actionsCount = actions.Value.Length;
     actionToCast = 0;
     OnAction();
 }
示例#3
0
 private void PrepareTimeChange()
 {
     if (runner == null)
     {
         runner = CoroutineRunner.Instantiate(this.name);
         DontDestroyOnLoad(runner);
     }
     if (timeInRoutine != null)
     {
         runner.StopCoroutine(timeInRoutine);
     }
 }
示例#4
0
 public void GetNextKey(GetKeyCallback callback, Action cancelCallback)
 {
     if (runner == null)
     {
         runner = CoroutineRunner.Instantiate(this.name + "_KeyGetter");
     }
     else if (nextKeyRoutine != null)
     {
         if (storedGetNextKeyCancel != null)
         {
             storedGetNextKeyCancel.Invoke();
         }
         runner.StopCoroutine(nextKeyRoutine);
     }
     storedGetNextKeyCancel = cancelCallback;
     nextKeyRoutine         = GetNextKeyRoutine(callback);
     runner.StartCoroutine(nextKeyRoutine);
 }