- Timestamp:
- May 28, 2011, 11:19:02 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel3/src/orxonox/infos/GametypeInfo.h
r8453 r8634 61 61 virtual ~GametypeInfo(); 62 62 63 virtual void changedActivity(void); // Is called when the activity has changed.64 65 63 /** 66 64 @brief Get whether the game has started yet. … … 103 101 void changedCountdownCounter(void); // Is called when the start countdown counter has changed. 104 102 103 /** 104 @brief Get whether the local player is ready to spawn. 105 @return Returns true if the player is ready to spawn, false if not. 106 */ 107 inline bool isReadyToSpawn() const 108 { return this->readyToSpawn_; } 109 void changedReadyToSpawn(bool ready); // Inform the GametypeInfo that the local player has changed its spawned status. 110 111 /** 112 @brief Get whether the local player is spawned. 113 @return Returns true if the local player is currently spawned, false if not. 114 */ 115 inline bool isSpawned() const 116 { return this->spawned_; } 117 void changedSpawned(bool spawned); // Inform the GametypeInfo that the local player has changed its spawned status. 118 105 119 inline const std::string& getHUDTemplate() const 106 120 { return this->hudtemplate_; } … … 120 134 121 135 protected: 122 void changedReadyToSpawn(PlayerInfo* player); // Is called when a player has become ready to spawn.123 124 136 void start(void); // Inform the GametypeInfo that the game has started. 125 137 void end(void); // Inform the GametypeInfo that the game has ended. … … 132 144 void pawnKilled(PlayerInfo* player); // Inform the GametypeInfo about a player whose Pawn has been killed. 133 145 void playerSpawned(PlayerInfo* player); // Inform the GametypeInfo about a player that has spawned. 146 void playerEntered(PlayerInfo* player); // Inform the GametypeInfo about a player that has entered, 134 147 135 148 inline void setHUDTemplate(const std::string& templateName) … … 138 151 private: 139 152 void registerVariables(); 153 void setSpawnedHelper(PlayerInfo* player, bool spawned); // Helper method. Sends changedReadyToSpawn notifiers over the network. 154 void setReadyToSpawnHelper(PlayerInfo* player, bool ready); // Helper method. Sends changedSpawned notifiers over the network. 140 155 141 156 static const std::string NOTIFICATION_SENDER; //!< The name of the sender for the sending of notifications. … … 148 163 std::string hudtemplate_; 149 164 150 std::set<PlayerInfo*> spawned_; //!< A set of players that are currently spawned. 165 std::set<PlayerInfo*> spawnedPlayers_; //!< A set of players that are currently spawned. 166 bool spawned_; //!< Whether the local Player is currently spawned. 167 bool readyToSpawn_; //!< Whether the local Player is ready to spawn. 151 168 }; 152 169 }
Note: See TracChangeset
for help on using the changeset viewer.