protected void OnAttackStateTransition(EntityComponent source, AttackManagerState state) { //If we're transitioning to idle then set our current target to the current waypoint if (state == AttackManagerState.Idle && CurrWaypoint != null) { CurrTarget = CurrWaypoint.transform; ForceRepath(); performingActions = false; } else if (state == AttackManagerState.Attacking) { performingActions = true; } }
protected virtual void TransitionToState(AttackManagerState newState) { if (AttackManagerState != newState) { AttackManagerState = newState; if (OnAttackManagerStateTransition != null) OnAttackManagerStateTransition(this.myEntityComponent, AttackManagerState); } }