Changeset 9141
- Timestamp:
- Apr 29, 2012, 3:42:22 PM (13 years ago)
- Location:
- code/branches/newlevel2012
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/data/levels/towerDefense.oxw
r9139 r9141 1 1 <!-- TODO: Update the level's image--> 2 3 <!-- See TowerDefenseReadme.txt for Information on this file --> 4 2 5 <LevelInfo 3 6 name = "Tower Defense" … … 17 20 include("templates/spaceshipPirate.oxt") 18 21 ?> 19 20 <!-- Hallo erstmal.21 Ich habe das Grundgerüst des Levels mal zum Laufen gebracht.22 Bei mir hat es das Playfield_ME.mesh allerdings nicht angezeigt; deswegen habe ich mit dem crate.mesh als testobjekt gearbeitet.23 Das Level macht genau das was ihr vermutlich erreichen wolltet. Wahrscheinlich wird die Funktionalität der "statischen Kamera" aber24 bloß in einer abgewandelten Art umgesetzt: In Pong und Tetris sind die Kameras nicht an das Spielfeld, sondern an ein ControllableEntity,25 das vom Spieler gesteuert wird gekoppelt.26 -->27 22 28 23 <!-- Specify the position of the camera --> -
code/branches/newlevel2012/src/modules/towerdefense/Tower.cc
r9135 r9141 6 6 // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 7 // 8 9 /* Not implemented fully */ 8 10 9 11 #include "Tower.h" -
code/branches/newlevel2012/src/modules/towerdefense/Tower.h
r9137 r9141 6 6 // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 7 // 8 9 /** 10 @brief 11 See TowerDefenseReadme.txt for Information. 12 13 @ingroup TowerDefense 14 */ 15 8 16 9 17 #ifndef Orxonox_Tower_h … … 21 29 virtual ~Tower() {}; 22 30 23 virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.24 virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.31 virtual void moveFrontBack(const Vector2& value); 32 virtual void moveRightLeft(const Vector2& value); 25 33 26 34 void setGame(TowerDefense* towerdefense) -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.h
r9140 r9141 26 26 * 27 27 */ 28 29 /** 30 @brief 31 GameType class for TowerDefense. See TowerDefenseReadme.txt for Information. 32 33 @ingroup TowerDefense 34 */ 35 28 36 29 37 #ifndef _TowerDefense_H__ -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9136 r9141 50 50 { 51 51 RegisterObject(TowerDefenseCenterpoint); 52 53 54 55 this->width_ = 10; 56 this->height_ = 11; 52 53 this->width_ = 15; 54 this->height_ = 15; 57 55 this->towerTemplate_ = ""; 58 56 59 57 this->checkGametype(); 60 58 } 61 59 … … 68 66 SUPER(TowerDefenseCenterpoint, XMLPort, xmlelement, mode); 69 67 70 XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode); // die Breite71 XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, setWidth, xmlelement, mode); // die Grösse68 XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode); 69 XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, setWidth, xmlelement, mode); 72 70 XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode); 73 71 } -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9112 r9141 28 28 29 29 /** 30 @file TowerDefenseCenterpoint.h 31 @brief Declaration of the TowerDefenseCenterpoint class. 32 @ingroup TowerDefense 33 */ 30 @brief 31 See TowerDefenseReadme.txt for Information. 32 @ingroup TowerDefense 33 */ 34 34 35 35 36 #ifndef _TowerDefenseCenterpoint_H__ … … 39 40 40 41 #include <string> 41 42 42 #include <util/Math.h> 43 43 … … 46 46 namespace orxonox 47 47 { 48 49 /**50 @brief51 52 53 @author54 55 @ingroup TowerDefense56 */57 48 class _TowerDefenseExport TowerDefenseCenterpoint : public StaticEntity 58 49 { 59 50 public: 60 TowerDefenseCenterpoint(BaseObject* creator); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually TowerDefense.51 TowerDefenseCenterpoint(BaseObject* creator); 61 52 virtual ~TowerDefenseCenterpoint() {} 62 53 63 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a TowerDefenseCenterpoint through XML. 64 65 virtual void changedGametype(); //!< Is called when the gametype has changed. 54 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 virtual void changedGametype(); 66 56 67 57 /** 68 @brief Set the width of the playing field. 69 @param width The width in number of tiles. 58 @brief The width and hight in number of tiles. Default is 15 for both. 70 59 */ 71 60 void setWidth(unsigned int width) 72 61 { this->width_ = width; } 73 /** 74 @brief Get the width of the playing field. 75 @return Returns the width in number of tiles. 76 */ 77 unsigned int getWidth(void) const 62 63 unsigned int getWidth(void) const 78 64 { return this->width_; } 79 65 80 /**81 @brief Set the height of the playing field.82 @param height The height in number of tiles.83 */84 66 void setHeight(unsigned int height) 85 67 { this->height_ = height; } 86 /** 87 @brief Get the height of the playing field. 88 @return Returns the height in number of tiles. 89 */ 90 unsigned int getHeight(void) const 68 69 unsigned int getHeight(void) const 91 70 { return this->height_; } 92 71 … … 97 76 void setTowerTemplate(const std::string& templateName) 98 77 { this->towerTemplate_ = templateName; } 99 /** 100 @brief Get the template for the towers. 101 @return Returns the template name to be applied to each tower. 102 */ 103 const std::string& getTowerTemplate(void) const 78 79 const std::string& getTowerTemplate(void) const 104 80 { return this->towerTemplate_; } 105 106 81 107 82 private: 108 void checkGametype(); //!< Checks whether the gametype is TowerDefense and if it is, sets its centerpoint.83 void checkGametype(); 109 84 110 85 unsigned int width_; 111 86 unsigned int height_; 112 87 std::string towerTemplate_; 113 114 88 }; 115 89 }
Note: See TracChangeset
for help on using the changeset viewer.