static bool Proc_TurnToFaceDisturbance(CEnemyShip enemyShip) { switch (enemyShip.m_Event) { case EEvent.none: // Process the state. if (enemyShip.state_LookingAtTarget) { enemyShip.m_Event = enemyShip.FindPrey() ? EEvent.transition_TurnToFacePrey : EEvent.transition_MoveToDisturbance; } break; default: // Shutdown the state. enemyShip.m_State = EState.none; return(true); } return(false); // Proc functions return false unless the event is uncaught. }
static bool Proc_Idle(CEnemyShip enemyShip) { switch (enemyShip.m_Event) { case EEvent.none: // Process the state. if (enemyShip.FindPrey()) // Todo: Do this only periodically. { enemyShip.m_Event = EEvent.transition_TurnToFacePrey; } break; default: // Shutdown the state. enemyShip.m_State = EState.none; return(true); } return(false); // Proc functions return false unless the event is uncaught. }
static bool Proc_TurnToFaceDisturbance(CEnemyShip enemyShip) { switch (enemyShip.m_Event) { case EEvent.none: // Process the state. if (enemyShip.state_LookingAtTarget) enemyShip.m_Event = enemyShip.FindPrey() ? EEvent.transition_TurnToFacePrey : EEvent.transition_MoveToDisturbance; break; default: // Shutdown the state. enemyShip.m_State = EState.none; return true; } return false; // Proc functions return false unless the event is uncaught. }
static bool Proc_Idle(CEnemyShip enemyShip) { switch (enemyShip.m_Event) { case EEvent.none: // Process the state. if (enemyShip.FindPrey())// Todo: Do this only periodically. enemyShip.m_Event = EEvent.transition_TurnToFacePrey; break; default: // Shutdown the state. enemyShip.m_State = EState.none; return true; } return false; // Proc functions return false unless the event is uncaught. }