Changeset 2485 for code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.h
- Timestamp:
- Dec 16, 2008, 6:01:13 PM (17 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
-
code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.h
r2459 r2485 45 45 virtual void tick(float dt); 46 46 void registerVariables(); 47 void setConfigValues(); 48 49 virtual void changedGametype(); 47 50 48 51 virtual void setPlayer(PlayerInfo* player); … … 60 63 virtual void moveUpDown(const Vector2& value) {} 61 64 62 virtual void rotateYaw(const Vector2& value) {} 63 virtual void rotatePitch(const Vector2& value) {} 64 virtual void rotateRoll(const Vector2& value) {} 65 virtual void rotateYaw(const Vector2& value); 66 virtual void rotatePitch(const Vector2& value); 67 virtual void rotateRoll(const Vector2& value); 68 69 inline void moveFrontBack(float value) 70 { this->moveFrontBack(Vector2(value, 0)); } 71 inline void moveRightLeft(float value) 72 { this->moveRightLeft(Vector2(value, 0)); } 73 inline void moveUpDown(float value) 74 { this->moveUpDown(Vector2(value, 0)); } 75 76 inline void rotateYaw(float value) 77 { this->rotateYaw(Vector2(value, 0)); } 78 inline void rotatePitch(float value) 79 { this->rotatePitch(Vector2(value, 0)); } 80 inline void rotateRoll(float value) 81 { this->rotateRoll(Vector2(value, 0)); } 65 82 66 83 virtual void fire() {} 67 84 virtual void altFire() {} 68 85 86 virtual void boost() {} 69 87 virtual void greet() {} 70 88 virtual void use() {} 71 89 virtual void switchCamera(); 90 virtual void mouseLook(); 72 91 73 92 inline const std::string& getHudTemplate() const … … 99 118 void setAngularVelocity(const Vector3& velocity); 100 119 120 inline bool hasLocalController() const 121 { return this->bHasLocalController_; } 122 inline bool hasHumanController() const 123 { return this->bHasHumanController_; } 124 125 inline const GametypeInfo* getGametypeInfo() const 126 { return this->gtinfo_; } 127 128 inline bool isInMouseLook() const 129 { return this->bMouseLook_; } 130 inline float getMouseLookSpeed() const 131 { return this->mouseLookSpeed_; } 132 101 133 protected: 102 virtual void startLocal Control();103 virtual void stopLocal Control();134 virtual void startLocalHumanControl(); 135 virtual void stopLocalHumanControl(); 104 136 105 137 inline void setHudTemplate(const std::string& name) 106 138 { this->hudtemplate_ = name; } 107 108 inline bool isLocallyControlled() const109 { return this->bControlled_; }110 139 111 140 private: … … 124 153 125 154 void networkcallback_changedplayerID(); 155 void networkcallback_changedgtinfoID(); 126 156 127 157 // Bullet btMotionState related … … 131 161 unsigned int client_overwrite_; 132 162 133 bool bControlled_; 163 bool bHasLocalController_; 164 bool bHasHumanController_; 165 bool bDestroyWhenPlayerLeft_; 166 134 167 Vector3 server_position_; 135 168 Vector3 client_position_; … … 143 176 PlayerInfo* player_; 144 177 unsigned int playerID_; 178 145 179 std::string hudtemplate_; 146 180 OverlayGroup* hud_; 181 147 182 Camera* camera_; 148 bool bDestroyWhenPlayerLeft_; 149 183 bool bMouseLook_; 184 float mouseLookSpeed_; 185 Ogre::SceneNode* cameraPositionRootNode_; 150 186 std::list<CameraPosition*> cameraPositions_; 151 187 std::string cameraPositionTemplate_; 188 189 const GametypeInfo* gtinfo_; 190 unsigned int gtinfoID_; 152 191 }; 153 192 }
Note: See TracChangeset
for help on using the changeset viewer.