Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpUnitMotion.cpp
Show All 33 Lines | |||||
DEFINE_INTERFACE_METHOD_CONST_0("GetSpeed", fixed, ICmpUnitMotion, GetSpeed) | DEFINE_INTERFACE_METHOD_CONST_0("GetSpeed", fixed, ICmpUnitMotion, GetSpeed) | ||||
DEFINE_INTERFACE_METHOD_CONST_0("GetWalkSpeed", fixed, ICmpUnitMotion, GetWalkSpeed) | DEFINE_INTERFACE_METHOD_CONST_0("GetWalkSpeed", fixed, ICmpUnitMotion, GetWalkSpeed) | ||||
DEFINE_INTERFACE_METHOD_CONST_0("GetRunMultiplier", fixed, ICmpUnitMotion, GetRunMultiplier) | DEFINE_INTERFACE_METHOD_CONST_0("GetRunMultiplier", fixed, ICmpUnitMotion, GetRunMultiplier) | ||||
DEFINE_INTERFACE_METHOD_1("SetSpeedMultiplier", void, ICmpUnitMotion, SetSpeedMultiplier, fixed) | DEFINE_INTERFACE_METHOD_1("SetSpeedMultiplier", void, ICmpUnitMotion, SetSpeedMultiplier, fixed) | ||||
DEFINE_INTERFACE_METHOD_CONST_0("GetPassabilityClassName", std::string, ICmpUnitMotion, GetPassabilityClassName) | DEFINE_INTERFACE_METHOD_CONST_0("GetPassabilityClassName", std::string, ICmpUnitMotion, GetPassabilityClassName) | ||||
DEFINE_INTERFACE_METHOD_CONST_0("GetUnitClearance", entity_pos_t, ICmpUnitMotion, GetUnitClearance) | DEFINE_INTERFACE_METHOD_CONST_0("GetUnitClearance", entity_pos_t, ICmpUnitMotion, GetUnitClearance) | ||||
DEFINE_INTERFACE_METHOD_1("SetFacePointAfterMove", void, ICmpUnitMotion, SetFacePointAfterMove, bool) | DEFINE_INTERFACE_METHOD_1("SetFacePointAfterMove", void, ICmpUnitMotion, SetFacePointAfterMove, bool) | ||||
DEFINE_INTERFACE_METHOD_CONST_0("GetFacePointAfterMove", bool, ICmpUnitMotion, GetFacePointAfterMove) | DEFINE_INTERFACE_METHOD_CONST_0("GetFacePointAfterMove", bool, ICmpUnitMotion, GetFacePointAfterMove) | ||||
DEFINE_INTERFACE_METHOD_0("ToggleTurnTime", void, ICmpUnitMotion, ToggleTurnTime) | |||||
DEFINE_INTERFACE_METHOD_1("SetDebugOverlay", void, ICmpUnitMotion, SetDebugOverlay, bool) | DEFINE_INTERFACE_METHOD_1("SetDebugOverlay", void, ICmpUnitMotion, SetDebugOverlay, bool) | ||||
END_INTERFACE_WRAPPER(UnitMotion) | END_INTERFACE_WRAPPER(UnitMotion) | ||||
class CCmpUnitMotionScripted : public ICmpUnitMotion | class CCmpUnitMotionScripted : public ICmpUnitMotion | ||||
{ | { | ||||
public: | public: | ||||
DEFAULT_SCRIPT_WRAPPER(UnitMotionScripted) | DEFAULT_SCRIPT_WRAPPER(UnitMotionScripted) | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | virtual void SetFacePointAfterMove(bool facePointAfterMove) | ||||
m_Script.CallVoid("SetFacePointAfterMove", facePointAfterMove); | m_Script.CallVoid("SetFacePointAfterMove", facePointAfterMove); | ||||
} | } | ||||
virtual bool GetFacePointAfterMove() const | virtual bool GetFacePointAfterMove() const | ||||
{ | { | ||||
return m_Script.Call<bool>("GetFacePointAfterMove"); | return m_Script.Call<bool>("GetFacePointAfterMove"); | ||||
} | } | ||||
virtual void ToggleTurnTime() | |||||
{ | |||||
m_Script.CallVoid("ToggleTurnTime"); | |||||
} | |||||
virtual pass_class_t GetPassabilityClass() const | virtual pass_class_t GetPassabilityClass() const | ||||
{ | { | ||||
return m_Script.Call<pass_class_t>("GetPassabilityClass"); | return m_Script.Call<pass_class_t>("GetPassabilityClass"); | ||||
} | } | ||||
virtual std::string GetPassabilityClassName() const | virtual std::string GetPassabilityClassName() const | ||||
{ | { | ||||
return m_Script.Call<std::string>("GetPassabilityClassName"); | return m_Script.Call<std::string>("GetPassabilityClassName"); | ||||
Show All 15 Lines |
Wildfire Games · Phabricator