public void OnExit() { this.active = false; this.finished = false; SkillStateAction[] array = this.Actions; for (int i = 0; i < array.Length; i++) { SkillStateAction fsmStateAction = array[i]; if (fsmStateAction.Entered) { this.activeAction = fsmStateAction; fsmStateAction.Init(this); fsmStateAction.OnExit(); } } }