1
0
forked from 0ad/0ad
0ad/source/simulation/EventHandlers.h
janwas 81eec3aa10 fix build breakage (baad!):
EventTypes.h: was missing comma. also insert onHeal string since that
array seems to depend on index values matching the enums (would be a
very insidious error!)
entity/entityorders: fix typo - ORDER_HEAL_NOTPATHING ->
ORDER_HEAL_NOPATHING
eventhandlers: was missing semicolon

This was SVN commit r3133.
2005-11-13 23:29:56 +00:00

80 lines
1.6 KiB
C++
Executable File

// List of event handlers (for entities) the engine will call in to.
// Using integer tags should be ever-so-slightly faster than the hashmap lookup
// Also allows events to be renamed without affecting other code.
#ifndef EVENT_HANDLERS_INCLUDED
#define EVENT_HANDLERS_INCLUDED
#include "scripting/DOMEvent.h"
#include "Vector3D.h"
class CDamageType;
class CEventInitialize : public CScriptEvent
{
public:
CEventInitialize() : CScriptEvent( L"initialize", EVENT_INITIALIZE, false ) {}
};
class CEventTick : public CScriptEvent
{
public:
CEventTick() : CScriptEvent( L"tick", EVENT_TICK, false ) {}
};
class CEventAttack : public CScriptEvent
{
CEntity* m_target;
public:
CEventAttack( CEntity* target );
};
class CEventGather : public CScriptEvent
{
CEntity* m_target;
public:
CEventGather( CEntity* target );
};
class CEventHeal : public CScriptEvent
{
CEntity* m_target;
public:
CEventHeal( CEntity* target );
};
class CEventDamage : public CScriptEvent
{
CEntity* m_inflictor;
CDamageType* m_damage;
public:
CEventDamage( CEntity* inflictor, CDamageType* damage );
};
class CEventTargetChanged : public CScriptEvent
{
CEntity* m_target;
public:
int m_defaultAction;
CStrW m_defaultCursor;
CEventTargetChanged( CEntity* target );
};
class CEventPrepareOrder : public CScriptEvent
{
CEntity* m_target;
int m_orderType;
public:
CEventPrepareOrder( CEntity* target, int orderType );
};
class CEventOrderTransition : public CScriptEvent
{
int m_orderPrevious;
int m_orderCurrent;
CEntity** m_target;
CVector3D* m_worldPosition;
public:
CEventOrderTransition( int orderPrevious, int orderCurrent, CEntity*& target, CVector3D& worldPosition );
};
#endif