Changeset 9139 for code/branches
- Timestamp:
- Apr 29, 2012, 12:52:05 PM (13 years ago)
- Location:
- code/branches/newlevel2012
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/data/levels/towerDefense.oxw
r9138 r9139 27 27 28 28 <!-- Specify the position of the camera --> 29 <Template name= playfieldcamerasdefaults=0>29 <Template name=centerpointmarkcamera defaults=0> 30 30 <Pawn> 31 31 <camerapositions> … … 35 35 </Template> 36 36 37 <!-- Loads the playfield mesh-->38 <Template name= playfield>39 <Pawn camerapositiontemplate= playfieldcameras>37 <!-- Loads a mesh to mark the center--> 38 <Template name=centerpointmark> 39 <Pawn camerapositiontemplate=centerpointmarkcamera> 40 40 <attached> 41 41 <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this --> … … 58 58 <Template link=lodtemplate_default /> 59 59 </templates> 60 60 61 <?lua include("includes/notifications.oxi") ?> 61 62 62 63 63 <Scene … … 65 65 skybox = "Orxonox/Starbox" 66 66 > 67 68 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> 69 67 68 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> 70 69 71 70 <!-- Spawns the camera, attached to a crate --> 72 <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=playfield /> 73 71 <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark /> 74 72 75 73 <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /--> 76 74 <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /--> 77 75 78 79 <!--SpaceShip position="-10,0,20" lookat="0,0,0"> 76 <!--SpaceShip position="-10,0,20" lookat="0,0,0"> 80 77 <templates> 81 78 <Template link=spaceshipassff /> … … 109 106 <Model position="-0.5,-0.5,0" mesh="Playfield_ME.mesh" scale=0.8 /> 110 107 108 <!-- This was used to mark the playfield, let's let it be here for now --> 111 109 <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /--> 112 110 <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /--> 113 111 <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /--> 114 112 <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /--> 115 116 <!--Model position="0,0,50" direction="0,0,0" mesh="rocket.mesh" scale3D="0.3,0.3,0.3" /-->117 113 118 114 </attached> -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc
r9138 r9139 83 83 TowerDefense::~TowerDefense() 84 84 { 85 /* Part of a temporary hack to allow the player to add towers */ 85 86 if (this->isInitialized()) 86 87 { … … 92 93 void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint) 93 94 { 94 orxout() << "got a centerpoint..." << endl; 95 95 orxout() << "Centerpoint now set..." << endl; 96 96 this->center_ = centerpoint; 97 97 } … … 101 101 Deathmatch::start(); 102 102 103 orxout()<< "Adding towers for debug..." <<endl; 104 105 addTower(0,15); 106 addTower(15,0); 107 103 orxout() << "Adding towers for debug..." << endl; 104 105 // Mark corners 106 addTower(0,15); addTower(15,0); 107 108 // Mark diagonal line 108 109 for (int i = 0 ; i <= 15; i++) 109 {110 110 addTower(i,i); 111 } 112 113 orxout()<< "Done" <<endl; 111 112 orxout() << "Done" << endl; 114 113 115 114 ChatManager::message("Use the console command addTower x y to add towers"); 116 } 117 118 /* 119 void TowerDefense::end() 120 { 121 Deathmatch::end(); 122 123 std::string message("The match has ended."); 124 ChatManager::message(message); 125 } 126 */ 115 } 116 117 void TowerDefense::end() 118 { 119 Deathmatch::end(); 120 121 ChatManager::message("Match is over"); 122 } 123 127 124 128 125 void TowerDefense::addTower(int x, int y) -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.h
r9136 r9139 50 50 //virtual void playerScored(PlayerInfo* player); 51 51 52 /* Called by TowerDefenseCenterpoint upon game start 53 The centerpoint is used to create towers 54 */ 52 55 void setCenterpoint(TowerDefenseCenterpoint *centerpoint); 53 56 57 /* Adds a tower at x, y in the playfield */ 58 void addTower(int x, int y); 59 54 60 /* Part of a temporary hack to allow the player to add towers */ 55 void addTower(int x, int y);56 61 ConsoleCommand* dedicatedAddTower_; 57 62
Note: See TracChangeset
for help on using the changeset viewer.