mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +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
|
|
@ -87,6 +87,10 @@ class Trigger : public GameBase
|
|||
String mLeaveCommand;
|
||||
String mTickCommand;
|
||||
|
||||
static const U32 CMD_SIZE = 1024;
|
||||
|
||||
protected:
|
||||
|
||||
enum TriggerUpdateBits
|
||||
{
|
||||
TransformMask = Parent::NextFreeMask << 0,
|
||||
|
|
@ -97,10 +101,6 @@ class Trigger : public GameBase
|
|||
NextFreeMask = Parent::NextFreeMask << 5,
|
||||
};
|
||||
|
||||
static const U32 CMD_SIZE = 1024;
|
||||
|
||||
protected:
|
||||
|
||||
static bool smRenderTriggers;
|
||||
bool testObject(GameBase* enter);
|
||||
void processTick(const Move *move);
|
||||
|
|
@ -142,7 +142,7 @@ class Trigger : public GameBase
|
|||
// Trigger
|
||||
void setTriggerPolyhedron(const Polyhedron&);
|
||||
|
||||
void potentialEnterObject(GameBase*);
|
||||
virtual void potentialEnterObject(GameBase*);
|
||||
U32 getNumTriggeringObjects() const;
|
||||
GameBase* getObject(const U32);
|
||||
const Vector<GameBase*>& getObjects() const { return mObjects; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue