Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpUnitMotion.cpp
Show All 34 Lines | |||||
DEFINE_INTERFACE_METHOD("GetSpeed", ICmpUnitMotion, GetSpeed) | DEFINE_INTERFACE_METHOD("GetSpeed", ICmpUnitMotion, GetSpeed) | ||||
DEFINE_INTERFACE_METHOD("GetWalkSpeed", ICmpUnitMotion, GetWalkSpeed) | DEFINE_INTERFACE_METHOD("GetWalkSpeed", ICmpUnitMotion, GetWalkSpeed) | ||||
DEFINE_INTERFACE_METHOD("GetRunMultiplier", ICmpUnitMotion, GetRunMultiplier) | DEFINE_INTERFACE_METHOD("GetRunMultiplier", ICmpUnitMotion, GetRunMultiplier) | ||||
DEFINE_INTERFACE_METHOD("EstimateFuturePosition", ICmpUnitMotion, EstimateFuturePosition) | DEFINE_INTERFACE_METHOD("EstimateFuturePosition", ICmpUnitMotion, EstimateFuturePosition) | ||||
DEFINE_INTERFACE_METHOD("SetSpeedMultiplier", ICmpUnitMotion, SetSpeedMultiplier) | DEFINE_INTERFACE_METHOD("SetSpeedMultiplier", ICmpUnitMotion, SetSpeedMultiplier) | ||||
DEFINE_INTERFACE_METHOD("GetAcceleration", ICmpUnitMotion, GetAcceleration) | DEFINE_INTERFACE_METHOD("GetAcceleration", ICmpUnitMotion, GetAcceleration) | ||||
DEFINE_INTERFACE_METHOD("SetAcceleration", ICmpUnitMotion, SetAcceleration) | DEFINE_INTERFACE_METHOD("SetAcceleration", ICmpUnitMotion, SetAcceleration) | ||||
DEFINE_INTERFACE_METHOD("GetPassabilityClassName", ICmpUnitMotion, GetPassabilityClassName) | DEFINE_INTERFACE_METHOD("GetPassabilityClassName", ICmpUnitMotion, GetPassabilityClassName) | ||||
DEFINE_INTERFACE_METHOD("SetPassabilityClassName", ICmpUnitMotion, SetPassabilityClassName) | |||||
DEFINE_INTERFACE_METHOD("GetUnitClearance", ICmpUnitMotion, GetUnitClearance) | DEFINE_INTERFACE_METHOD("GetUnitClearance", ICmpUnitMotion, GetUnitClearance) | ||||
DEFINE_INTERFACE_METHOD("SetFacePointAfterMove", ICmpUnitMotion, SetFacePointAfterMove) | DEFINE_INTERFACE_METHOD("SetFacePointAfterMove", ICmpUnitMotion, SetFacePointAfterMove) | ||||
DEFINE_INTERFACE_METHOD("GetFacePointAfterMove", ICmpUnitMotion, GetFacePointAfterMove) | DEFINE_INTERFACE_METHOD("GetFacePointAfterMove", ICmpUnitMotion, GetFacePointAfterMove) | ||||
DEFINE_INTERFACE_METHOD("SetDebugOverlay", ICmpUnitMotion, SetDebugOverlay) | DEFINE_INTERFACE_METHOD("SetDebugOverlay", ICmpUnitMotion, SetDebugOverlay) | ||||
END_INTERFACE_WRAPPER(UnitMotion) | END_INTERFACE_WRAPPER(UnitMotion) | ||||
class CCmpUnitMotionScripted : public ICmpUnitMotion | class CCmpUnitMotionScripted : public ICmpUnitMotion | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | pass_class_t GetPassabilityClass() const override | ||||
return m_Script.Call<pass_class_t>("GetPassabilityClass"); | return m_Script.Call<pass_class_t>("GetPassabilityClass"); | ||||
} | } | ||||
std::string GetPassabilityClassName() const override | std::string GetPassabilityClassName() const override | ||||
{ | { | ||||
return m_Script.Call<std::string>("GetPassabilityClassName"); | return m_Script.Call<std::string>("GetPassabilityClassName"); | ||||
} | } | ||||
void SetPassabilityClassName(const std::string& passClassName) override | |||||
{ | |||||
return m_Script.CallVoid("SetPassabilityClassName", passClassName); | |||||
} | |||||
entity_pos_t GetUnitClearance() const override | entity_pos_t GetUnitClearance() const override | ||||
{ | { | ||||
return m_Script.Call<entity_pos_t>("GetUnitClearance"); | return m_Script.Call<entity_pos_t>("GetUnitClearance"); | ||||
} | } | ||||
void SetDebugOverlay(bool enabled) override | void SetDebugOverlay(bool enabled) override | ||||
{ | { | ||||
m_Script.CallVoid("SetDebugOverlay", enabled); | m_Script.CallVoid("SetDebugOverlay", enabled); | ||||
} | } | ||||
}; | }; | ||||
REGISTER_COMPONENT_SCRIPT_WRAPPER(UnitMotionScripted) | REGISTER_COMPONENT_SCRIPT_WRAPPER(UnitMotionScripted) |
Wildfire Games · Phabricator