Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10126 for code/branches


Ignore:
Timestamp:
Nov 19, 2014, 1:14:02 PM (10 years ago)
Author:
maxima
Message:

Waypointcontroller in Enemy template

Location:
code/branches/towerdefenseHS14
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/towerdefenseHS14/data/levels/templates/enemyTowerdefense.oxt

    r10125 r10126  
    4040   explosionSound = "sounds/Explosion2.ogg"
    4141  >
     42
    4243    <engines>
    4344      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine />
     
    5758      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
    5859    </collisionShapes>
     60    <controller>
     61        <WaypointController accuracy=60>
     62          <waypoints>
     63            <!-- 1,3 10,3 10,11, 13,11 -->
     64            <Model mesh="cube.mesh" scale=10 position="-700,-500, 150" />
     65            <Model mesh="cube.mesh" scale=10 position=" -400,-500, 150" />
     66            <Model  position=" -400, 600, 150" />
     67            <Model mesh="cube.mesh" scale=10 position=" 500, 600, 150" />
     68            <Model mesh="cube.mesh" scale=10 position=" 500, 700, 150" />
     69          </waypoints>
     70        </WaypointController>
     71      </controller>
    5972  </TowerDefenseEnemy>
    6073</Template>
  • code/branches/towerdefenseHS14/data/levels/towerDefense.oxw

    r10125 r10126  
    7777    <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    7878
    79     <SpaceShip position="-700,-500, 100" lookat="0,0,0" scale=3 team=1 >
     79    <TowerDefenseEnemy position="-700,-500, 100" lookat="0,0,0" scale=3 team=1 >
    8080      <templates>
    8181        <Template link=enemytowerdefense />
     
    9393        </WaypointController>
    9494      </controller>
    95     </SpaceShip>
     95    </TowerDefenseEnemy>
    9696
    9797
  • code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc

    r10125 r10126  
    163163
    164164
    165         for(int i = 0 ; i < 1 ; ++i)
     165        for(int i = 0 ; i < 20 ; ++i)
    166166        {
    167167                addTowerDefenseEnemy(path);
     
    184184        en1->addTemplate("enemytowerdefense");
    185185        en1->setScale(3);
     186        en1->getController();
    186187
    187188
  • code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc

    r10123 r10126  
    2424        Constructor. Registers and initializes the object.
    2525    */
    26     TowerDefenseEnemy::TowerDefenseEnemy(Context* context) : Pawn(context)
     26    TowerDefenseEnemy::TowerDefenseEnemy(Context* context) : SpaceShip(context)
    2727    {
    2828        RegisterObject(TowerDefenseEnemy);
     
    3535    {
    3636        orxout() << "test4" << endl;
    37         Waypointsvector_.push_back(coord);
     37        this->Waypointsvector_.push_back(coord);
    3838        orxout() << "test5" << endl;
    3939    }
     
    5858    }
    5959*/
     60
    6061}
  • code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.h

    r10123 r10126  
    2828 *
    2929 */
    30         class _TowerDefenseExport TowerDefenseEnemy : public Pawn
     30        class _TowerDefenseExport TowerDefenseEnemy : public SpaceShip
    3131        {
    3232
     
    4141        void popWaypoint();
    4242        TDCoordinate peekWaypoint();
     43
     44
    4345        private:
    4446
Note: See TracChangeset for help on using the changeset viewer.