Dragonfly  4.3
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::State Class Referenceabstract

Public Member Functions

 State ()
 
void setType (std::string new_type)
 
std::string getType () const
 
virtual void Enter (Object *p_obj)
 
virtual void Execute (Object *p_obj)=0
 
virtual void Exit (Object *p_obj)
 

Private Attributes

std::string m_state_type
 

Constructor & Destructor Documentation

df::State::State ( )

Name of state.

Member Function Documentation

virtual void df::State::Enter ( Object p_obj)
virtual

Invoked when state first entered.

virtual void df::State::Execute ( Object p_obj)
pure virtual

Invoked every game loop step.

virtual void df::State::Exit ( Object p_obj)
virtual

Invoked when state exited.

std::string df::State::getType ( ) const

Get name of state.

void df::State::setType ( std::string  new_type)

Set name of state.