mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 13:23:56 -07:00
33 lines
No EOL
1 KiB
C++
Executable file
33 lines
No EOL
1 KiB
C++
Executable file
#include "precompiled.h"
|
|
#include "EventHandlers.h"
|
|
#include "Entity.h"
|
|
|
|
CEventAttack::CEventAttack( CEntity* target ) : CScriptEvent( L"attack", true, EVENT_ATTACK )
|
|
{
|
|
m_target = target;
|
|
AddProperty( L"target", &m_target );
|
|
}
|
|
|
|
CEventDamage::CEventDamage( CEntity* inflictor, CDamageType* damage ) : CScriptEvent( L"takesDamage", true, EVENT_DAMAGE )
|
|
{
|
|
m_inflictor = inflictor;
|
|
m_damage = damage;
|
|
AddReadOnlyProperty( L"inflictor", &m_inflictor );
|
|
AddProperty( L"damage", &m_damage );
|
|
}
|
|
|
|
CEventTargetChanged::CEventTargetChanged( CEntity* target ) : CScriptEvent( L"targetChanged", false, EVENT_TARGET_CHANGED )
|
|
{
|
|
m_target = target;
|
|
m_defaultAction = -1;
|
|
AddReadOnlyProperty( L"target", &m_target );
|
|
AddProperty( L"defaultAction", &m_defaultAction );
|
|
}
|
|
|
|
CEventPrepareOrder::CEventPrepareOrder( CEntity* target, int orderType ) : CScriptEvent( L"prepareOrder", true, EVENT_PREPARE_ORDER )
|
|
{
|
|
m_target = target;
|
|
m_orderType = orderType;
|
|
AddReadOnlyProperty( L"target", &m_target );
|
|
AddReadOnlyProperty( L"orderType", &m_orderType );
|
|
} |