Changeset 9175
- Timestamp:
- May 11, 2012, 4:03:28 PM (13 years ago)
- Location:
- code/branches/newlevel2012
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/data/levels/includes/towerWeaponSettings.oxi
r9161 r9175 20 20 <Weapon> 21 21 <attached> 22 <Model mesh="LightningGun.mesh" pitch="100" roll="90" yaw="90" position="0,-1.3,0" />23 <Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" />24 <Model mesh="hs-w01_reduced.mesh" roll=" 90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6/>22 <Model mesh="LightningGun.mesh" pitch="100" roll="90" yaw="90" position="0,-1.3,0" scale=1/> 23 <Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" scale=1 /> 24 <Model mesh="hs-w01_reduced.mesh" roll="45" pitch="-76" yaw="-45" position="-1.5,1,0.3" scale=100 /> 25 25 </attached> 26 26 <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" /> -
code/branches/newlevel2012/data/levels/templates/tower.oxt
r9161 r9175 1 1 <Template name=tower> 2 < SpaceShip2 <Tower 3 3 4 spawnparticlesource = "Orxonox/fairytwirl" 5 spawnparticleduration = 3 4 6 5 explosionchunks = 6 7 6 8 health = 1009 maxhealth = 20010 initialhealth = 10011 12 shieldhealth = 3013 initialshieldhealth = 3014 maxshieldhealth = 5015 shieldabsorption = 0.816 7 reloadrate = 1 17 8 reloadwaittime = 1 18 9 19 lift = 1;20 stallSpeed = 220;10 collisionType = "dynamic" 11 team = 13 21 12 22 collisionType = "dynamic"23 mass = 10024 linearDamping = 0.725 angularDamping = 0.999999926 13 > 27 14 … … 33 20 34 21 35 < !--attached>36 <Model position="0,0,0" scale= 25mesh="Tower_ME.mesh" />37 </attached -->22 <attached> 23 <Model position="0,0,0" scale=50 mesh="Tower_ME.mesh" /> 24 </attached> 38 25 39 26 <!--collisionShapes> … … 44 31 include("../includes/towerWeaponSettings.oxi") 45 32 ?> 46 </ SpaceShip>33 </Tower> 47 34 </Template> 48 35 -
code/branches/newlevel2012/data/levels/towerDefense.oxw
r9173 r9175 51 51 </Template--> 52 52 53 54 55 56 53 57 <Level gametype = "TowerDefense"> 54 58 <templates> … … 80 84 <waypoints> 81 85 <!-- 1,3 10,3 10,11, 13,11 --> 82 <Model mesh="cube.mesh" scale= 1position="-700,-500, 100" />83 <Model mesh="cube.mesh" scale= 1position=" 200,-500, 100" />84 <Model mesh="cube.mesh" scale= 1position=" 200, 300, 100" />85 <Model mesh="cube.mesh" scale= 1position=" 500, 300, 100" />86 <Model mesh="cube.mesh" scale=20 position="-700,-500, 100" /> 87 <Model mesh="cube.mesh" scale=20 position=" 200,-500, 100" /> 88 <Model mesh="cube.mesh" scale=20 position=" 200, 300, 100" /> 89 <Model mesh="cube.mesh" scale=20 position=" 500, 300, 100" /> 86 90 </waypoints> 87 91 </WaypointController> … … 89 93 </SpaceShip> 90 94 91 <!-- PlayField --> 92 <TowerDefenseCenterpoint 93 name=towerdefensecenter 94 width=16 95 height=16 96 tileScale=100 97 towerTemplate=tower 98 position="0,0,0" 99 direction="0,0,0" 100 collistionType=static 101 mass=100000> 102 95 96 <!--invisible entity to attach towers to, since playfield is static and towers are dynamic--> 97 <StaticEntity position=0,0,0> 98 103 99 <attached> 104 100 <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 /> … … 118 114 <BoxCollisionShape position="0,0,0" halfExtents="400,400,100" /> 119 115 </collisionShapes> 116 </StaticEntity> 117 118 119 120 121 <!-- PlayField --> 122 <TowerDefenseCenterpoint 123 name=towerdefensecenter 124 width=16 125 height=16 126 tileScale=100 127 towerTemplate=tower 128 position="0,0,0" 129 direction="0,0,0" 130 collisionType=dynamic 131 mass=100000> 132 120 133 </TowerDefenseCenterpoint> 121 134 -
code/branches/newlevel2012/src/modules/towerdefense/Tower.cc
r9161 r9175 22 22 Constructor. Registers and initializes the object. 23 23 */ 24 Tower::Tower(BaseObject* creator) : ControllableEntity(creator)24 Tower::Tower(BaseObject* creator) : SpaceShip(creator) 25 25 { 26 26 RegisterObject(Tower); 27 28 this->setCollisionType(WorldEntity::Dynamic); 29 30 31 27 32 /* 28 33 this->size_ = 10.0f; -
code/branches/newlevel2012/src/modules/towerdefense/Tower.h
r9141 r9175 19 19 20 20 #include "towerdefense/TowerDefensePrereqs.h" 21 #include "worldentities/ ControllableEntity.h"21 #include "worldentities/pawns/SpaceShip.h" 22 22 23 23 namespace orxonox 24 24 { 25 class _OrxonoxExport Tower : public ControllableEntity25 class _OrxonoxExport Tower : public SpaceShip 26 26 { 27 27 public: -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc
r9172 r9175 118 118 void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint) 119 119 { 120 orxout() << "Centerpoint now setting..." << endl; 121 this->center_ = centerpoint; 120 122 orxout() << "Centerpoint now set..." << endl; 121 this->center_ = centerpoint;122 123 } 123 124 … … 191 192 Tower* newTower = new Tower(this->center_); 192 193 newTower->addTemplate(this->center_->getTowerTemplate()); 193 194 this->center_->attach(newTower);195 194 195 //this->center_->attach(newTower); 196 196 197 newTower->setPosition((x-8) * tileScale, (y-8) * tileScale, 100); 197 198 newTower->setGame(this); 198 199 199 //TODO: Save the Tower in a Vector. I would suggest std::vector< std::vector<Tower*> > towers_ as a protected member variable; 200 200 -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9154 r9175 47 47 Constructor. Registers and initializes the object and checks whether the gametype is actually TowerDefense. 48 48 */ 49 TowerDefenseCenterpoint::TowerDefenseCenterpoint(BaseObject* creator) : StaticEntity(creator)49 TowerDefenseCenterpoint::TowerDefenseCenterpoint(BaseObject* creator) : MobileEntity(creator) 50 50 { 51 51 RegisterObject(TowerDefenseCenterpoint); … … 55 55 this->towerTemplate_ = ""; 56 56 57 //this->setCollisionType(Static); 58 57 59 this->checkGametype(); 60 58 61 } 59 62 -
code/branches/newlevel2012/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9154 r9175 42 42 #include <util/Math.h> 43 43 44 #include "worldentities/ StaticEntity.h"44 #include "worldentities/MobileEntity.h" 45 45 46 46 namespace orxonox 47 47 { 48 class _TowerDefenseExport TowerDefenseCenterpoint : public StaticEntity48 class _TowerDefenseExport TowerDefenseCenterpoint : public MobileEntity 49 49 { 50 50 public: -
code/branches/newlevel2012/src/orxonox/worldentities/WorldEntity.cc
r8858 r9175 379 379 if (!object->notifyBeingAttached(this)) 380 380 return; 381 382 381 this->attachNode(object->node_); 383 382 this->children_.insert(object);
Note: See TracChangeset
for help on using the changeset viewer.