mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Made Trigger friendlier towards inheritance.
Specifically: * Made update bits constants protected so that derived classes can use them - especially NextFreeMask! IIRC, most classes make these constants public, though there's no real reason to. * Made potentialEnterObject virtual so that derived classes can substitute their own logic.
This commit is contained in:
parent
9c343d1364
commit
a1740e8a9c
1 changed files with 5 additions and 5 deletions
|
|
@ -87,6 +87,10 @@ class Trigger : public GameBase
|
||||||
String mLeaveCommand;
|
String mLeaveCommand;
|
||||||
String mTickCommand;
|
String mTickCommand;
|
||||||
|
|
||||||
|
static const U32 CMD_SIZE = 1024;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
enum TriggerUpdateBits
|
enum TriggerUpdateBits
|
||||||
{
|
{
|
||||||
TransformMask = Parent::NextFreeMask << 0,
|
TransformMask = Parent::NextFreeMask << 0,
|
||||||
|
|
@ -97,10 +101,6 @@ class Trigger : public GameBase
|
||||||
NextFreeMask = Parent::NextFreeMask << 5,
|
NextFreeMask = Parent::NextFreeMask << 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const U32 CMD_SIZE = 1024;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
static bool smRenderTriggers;
|
static bool smRenderTriggers;
|
||||||
bool testObject(GameBase* enter);
|
bool testObject(GameBase* enter);
|
||||||
void processTick(const Move *move);
|
void processTick(const Move *move);
|
||||||
|
|
@ -142,7 +142,7 @@ class Trigger : public GameBase
|
||||||
// Trigger
|
// Trigger
|
||||||
void setTriggerPolyhedron(const Polyhedron&);
|
void setTriggerPolyhedron(const Polyhedron&);
|
||||||
|
|
||||||
void potentialEnterObject(GameBase*);
|
virtual void potentialEnterObject(GameBase*);
|
||||||
U32 getNumTriggeringObjects() const;
|
U32 getNumTriggeringObjects() const;
|
||||||
GameBase* getObject(const U32);
|
GameBase* getObject(const U32);
|
||||||
const Vector<GameBase*>& getObjects() const { return mObjects; }
|
const Vector<GameBase*>& getObjects() const { return mObjects; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue