Changeset 8700 for code/branches/presentation/src/modules/docking/Dock.h
- Timestamp:
- Jun 6, 2011, 8:15:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/modules/docking/Dock.h
r8645 r8700 55 55 : public StaticEntity 56 56 { // tolua_export 57 public:58 Dock(BaseObject* creator);59 virtual ~Dock();57 public: 58 Dock(BaseObject* creator); 59 virtual ~Dock(); 60 60 61 // Trigger interface62 bool execute(bool bTriggered, BaseObject* trigger);61 // Trigger interface 62 bool execute(bool bTriggered, BaseObject* trigger); 63 63 64 // XML interface65 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);66 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);64 // XML interface 65 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 66 virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 67 67 68 // XML functions69 bool addEffect(DockingEffect* effect); //!< Add a DockingEffect to the Dock.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.68 // XML functions 69 bool addEffect(DockingEffect* effect); //!< Add a DockingEffect to the Dock. 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. 73 73 74 // Docking/undocking logic, checks conditions and invokes the DockingAnimations75 bool dock(PlayerInfo* player); //!< Returns true if given player docked successfully (player must be a candidate)76 bool undock(PlayerInfo* player); //!< Undocks a player (player must be docked)74 // Docking/undocking logic, checks conditions and invokes the DockingAnimations 75 bool dock(PlayerInfo* player); //!< Returns true if given player docked successfully (player must be a candidate) 76 bool undock(PlayerInfo* player); //!< Undocks a player (player must be docked) 77 77 78 // Animation logic79 bool dockingAnimationFinished(PlayerInfo* player); //!< Called when a docking animation finished80 bool undockingAnimationFinished(PlayerInfo* player); //!< Called when a undocking animation finished78 // 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 81 82 // LUA interface 83 void dock() { this->dock(HumanController::getLocalControllerSingleton()->getPlayer()); } // tolua_export 84 static unsigned int getNumberOfActiveDocks(); // tolua_export 85 static Dock* getActiveDockAtIndex(unsigned int index); // tolua_export 82 // LUA interface 83 // tolua_begin 84 void dock() 85 { this->dock(HumanController::getLocalControllerSingleton()->getPlayer()); } 86 static unsigned int getNumberOfActiveDocks(); 87 static Dock* getActiveDockAtIndex(unsigned int index); 88 // tolua_end 86 89 87 // Console commands88 static void cmdDock();89 static void cmdUndock();90 // Console commands 91 static void cmdDock(); 92 static void cmdUndock(); 90 93 91 private:92 std::set<PlayerInfo*> candidates; //!< A set of all players which are allowed to dock using the console command.93 std::set<PlayerInfo*> docked; //!< A set of all docked players94 private: 95 std::set<PlayerInfo*> candidates_; //!< A set of all players which are allowed to dock using the console command. 96 std::set<PlayerInfo*> docked_; //!< A set of all docked players 94 97 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 docks98 std::list<DockingEffect*> effects_; //!< The list of DockingEffects to be executed when a player docks. 99 std::list<DockingAnimation*> animations_; //!< The list of DockingAnimations to be executed before a player docks 97 100 }; // tolua_export 98 101 } // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.