[Orxonox-commit 4458] r9129 - in code/branches/newlevel2012: data/levels src/modules/towerdefense
mentzerf at orxonox.net
mentzerf at orxonox.net
Fri Apr 27 15:59:19 CEST 2012
Author: mentzerf
Date: 2012-04-27 15:59:19 +0200 (Fri, 27 Apr 2012)
New Revision: 9129
Modified:
code/branches/newlevel2012/data/levels/towerDefense.oxw
code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc
Log:
added spaceship that follows four waypoints on the playfield
Modified: code/branches/newlevel2012/data/levels/towerDefense.oxw
===================================================================
--- code/branches/newlevel2012/data/levels/towerDefense.oxw 2012-04-27 13:58:26 UTC (rev 9128)
+++ code/branches/newlevel2012/data/levels/towerDefense.oxw 2012-04-27 13:59:19 UTC (rev 9129)
@@ -29,7 +29,7 @@
<Template name=playfieldcameras defaults=0>
<Pawn>
<camerapositions>
- <CameraPosition position="200,0,250" absolute=true />
+ <CameraPosition position="200,0,350" absolute=true />
</camerapositions>
</Pawn>
</Template>
@@ -69,6 +69,23 @@
<!--SpawnPoint team=1 position="0,0,30" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
+
+ <SpaceShip position="-10,0,20" lookat="0,0,0">
+ <templates>
+ <Template link=spaceshipassff />
+ </templates>
+ <controller>
+ <WaypointController accuracy=3>
+ <waypoints>
+ <Model mesh="cube.mesh" scale=1 position="110,90,20" />
+ <Model mesh="cube.mesh" scale=2 position="290,90,20" />
+ <Model mesh="cube.mesh" scale=3 position="290,-90,20" />
+ <Model mesh="cube.mesh" scale=4 position="110,-90,20" />
+ </waypoints>
+ </WaypointController>
+ </controller>
+ </SpaceShip>
+
<!--StaticEntity position="0,0,0" direction="0,0,0" collistionType=static mass=100000>
<attached>
Modified: code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc 2012-04-27 13:58:26 UTC (rev 9128)
+++ code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc 2012-04-27 13:59:19 UTC (rev 9129)
@@ -57,6 +57,7 @@
#include "TowerDefense.h"
#include "worldentities/SpawnPoint.h"
#include "worldentities/pawns/Pawn.h"
+#include "worldentities/pawns/SpaceShip.h"
namespace orxonox
{
@@ -92,6 +93,7 @@
static bool test = false;
if (!test)
+ {
orxout()<< "First tick." <<endl;
spawnEnemy();
}
@@ -100,8 +102,9 @@
void TowerDefense::spawnEnemy()
{
- // SpawnPoint *sp = *this->spawnpoints_.begin();
- //Pawn* p = sp->spawn();
+ SpawnPoint *sp = *this->spawnpoints_.begin();
+
+ Pawn* p = sp->spawn();
}
/*
More information about the Orxonox-commit
mailing list