Plasma Engine  2.0
Loading...
Searching...
No Matches
plAiActionQueue Class Reference

Public Member Functions

bool IsEmpty () const
 Returns true when no action is currently queued.
 
void InterruptAndClear ()
 Destroys all actions immediately and clears the queue.
 
void CancelCurrentActions (plGameObject &owner)
 Instructs all currently queued actions to cancel their current or future work.
 
void QueueAction (plAiAction *pAction)
 Appends an action for execution after the previous actions are finished.
 
void Execute (plGameObject &owner, plTime tDiff, plLogInterface *pLog)
 Executes the first action in the queue.
 
void PrintDebugInfo (plGameObject &owner)
 

Member Function Documentation

◆ CancelCurrentActions()

void plAiActionQueue::CancelCurrentActions ( plGameObject & owner)

Instructs all currently queued actions to cancel their current or future work.

This does not remove any action (not even the ones that aren't started yet), and it doesn't guarantee that actions won't do anything anymore. In fact for some actions it is quite important that they do something, even when canceled, to leave the object in a clean state.

◆ Execute()

void plAiActionQueue::Execute ( plGameObject & owner,
plTime tDiff,
plLogInterface * pLog )

Executes the first action in the queue.

If the action finishes successfully, the next action gets executed. If an action fails to execute the entire queue gets canceled via CancelCurrentActions().

◆ InterruptAndClear()

void plAiActionQueue::InterruptAndClear ( )

Destroys all actions immediately and clears the queue.

This is likely to leave the game object in an intermediate (broken) state, since actions won't clean up after themselves.

This should only be called when the action queue isn't needed anymore, at all, and the proper state of the the target object is enforced with other means.


The documentation for this class was generated from the following files: