private IEnumerator ActivateMovement() { if (stickmanEvents.IsPlayer) { StartMove(); } else { switch (enemyActivation.delayType) { case DelayActivationType.NoDelay: StartMove(); break; case DelayActivationType.DelayByTime: yield return(new WaitForSeconds(enemyActivation.delayTime)); StartMove(); break; case DelayActivationType.DelayByTrigger: stickmanEvents.OnActivate += StartMove; stickmanEvents.OnActivateTrigger(); break; } } }