From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Dynamics/ConstantForce.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Runtime/Dynamics/ConstantForce.h (limited to 'Runtime/Dynamics/ConstantForce.h') diff --git a/Runtime/Dynamics/ConstantForce.h b/Runtime/Dynamics/ConstantForce.h new file mode 100644 index 0000000..8bcd90b --- /dev/null +++ b/Runtime/Dynamics/ConstantForce.h @@ -0,0 +1,30 @@ +#ifndef CONSTANTFORCE_H +#define CONSTANTFORCE_H + +#include "Runtime/GameCode/Behaviour.h" +#include "Runtime/Math/Vector3.h" + +class ConstantForce : public Behaviour +{ + public: + REGISTER_DERIVED_CLASS (ConstantForce, Behaviour) + DECLARE_OBJECT_SERIALIZE (ConstantForce) + + ConstantForce (MemLabelId label, ObjectCreationMode mode); + virtual void Reset (); + + virtual void FixedUpdate (); + virtual void AddToManager (); + virtual void RemoveFromManager (); + + Vector3f m_Force; ///< Force applied globally + Vector3f m_RelativeForce; ///< Force applied locally + Vector3f m_Torque; ///< Torque applied globally + Vector3f m_RelativeTorque; ///< Torque applied locally + + + BehaviourListNode m_FixedUpdateNode; +}; + + +#endif -- cgit v1.1-26-g67d0