Dragonfly 4.19
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

◆ State()

df::State::State ( )

Name of state.

Member Function Documentation

◆ Enter()

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

Invoked when state first entered.

◆ Execute()

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

Invoked every game loop step.

◆ Exit()

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

Invoked when state exited.

◆ getType()

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

Get name of state.

◆ setType()

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

Set name of state.