Changeset 8493 for code/branches/dockingsystem2/src/modules/docking/Dock.h
- Timestamp:
- May 16, 2011, 6:21:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/dockingsystem2/src/modules/docking/Dock.h
r8434 r8493 46 46 47 47 #include "DockingEffect.h" 48 #include "DockingAnimation.h" 48 49 #include "DockingPrereqs.h" 49 50 … … 58 59 virtual ~Dock(); 59 60 61 // Trigger interface 62 bool execute(bool bTriggered, BaseObject* trigger); 63 64 // XML interface 60 65 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 61 66 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 62 67 63 bool execute(bool bTriggered, BaseObject* trigger); 64 68 // XML functions 65 69 bool addEffect(DockingEffect* effect); //!< Add a DockingEffect to the Dock. 66 70 const DockingEffect* getEffect(unsigned int index) const; //!< Get the DockingEffect at a given index. 71 bool addAnimation(DockingAnimation* animation); //!< Add a DockingAnimation to the Dock. 72 const DockingAnimation* getAnimation(unsigned int index) const; //!< Get the DockingAnimation at a given index. 67 73 74 // Docking/undocking logic, checks conditions and invokes the DockingAnimations 68 75 bool dock(PlayerInfo* player); //!< Returns true if given player docked successfully (player must be a candidate) 69 76 bool undock(PlayerInfo* player); //!< Undocks a player (player must be docked) 70 77 78 // Animation logic 79 bool dockingAnimationFinished(PlayerInfo* player); //!< Called when a docking animation finished 80 bool undockingAnimationFinished(PlayerInfo* player); //!< Called when a undocking animation finished 81 82 // LUA interface 71 83 void dock() { this->dock(HumanController::getLocalControllerSingleton()->getPlayer()); } // tolua_export 72 84 static unsigned int getNumberOfActiveDocks(); // tolua_export 73 85 static Dock* getActiveDockAtIndex(unsigned int index); // tolua_export 74 86 87 // Console commands 75 88 static void cmdDock(); 76 89 static void cmdUndock(); … … 79 92 std::set<PlayerInfo*> candidates; //!< A set of all players which are allowed to dock using the console command. 80 93 std::set<PlayerInfo*> docked; //!< A set of all docked players 94 81 95 std::list<DockingEffect*> effects; //!< The list of DockingEffects to be executed when a player docks. 96 std::list<DockingAnimation*> animations; //!< The list of DockingAnimations to be executed before a player docks 82 97 }; // tolua_export 83 98 } // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.