Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9131 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 4, 2006, 2:43:20 PM (18 years ago)
Author:
bensch
Message:

added laser_cannon

Location:
branches/presentation/src
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/defs/class_id.h

    r9123 r9131  
    213213  // Weapons
    214214  CL_TEST_GUN                   =    0x000003a0,
    215   CL_TURRET                     =    0x000003a1,
    216   CL_AIMING_TURRET              =    0x000003a2,
    217   CL_CANNON                     =    0x000003a3,
    218   CL_TARGETING_TURRET           =    0x000003a4,
    219   CL_HYPERBLASTER               =    0x000003a5,
    220   CL_FPS_SNIPER_RIFLE           =    0x000003a6,
    221   CL_FPS_LASER_RIFLE            =    0x000003a7,
     215  CL_LASER_CANNON               =    0x000003a1,
     216  CL_TURRET                     =    0x000003a2,
     217  CL_AIMING_TURRET              =    0x000003a3,
     218  CL_CANNON                     =    0x000003a4,
     219  CL_TARGETING_TURRET           =    0x000003a5,
     220  CL_HYPERBLASTER               =    0x000003a6,
     221  CL_FPS_SNIPER_RIFLE           =    0x000003a7,
     222  CL_FPS_LASER_RIFLE            =    0x000003a8,
    222223
    223224  // Projectiles
  • branches/presentation/src/world_entities/WorldEntities.am

    r9061 r9131  
    2222                \
    2323                world_entities/weapons/test_gun.cc \
     24                world_entities/weapons/laser_cannon.cc \
    2425                world_entities/weapons/turret.cc \
    2526                world_entities/weapons/aiming_turret.cc \
     
    8788                \
    8889                weapons/test_gun.h \
     90                weapons/laser_cannon.cc \
    8991                weapons/cannon.h \
    9092                weapons/hyperblaster.h \
  • branches/presentation/src/world_entities/space_ships/spacecraft_2d.cc

    r9124 r9131  
    301301        State::getCameraNode()->setRelCoorSoft(-3, 50,0);
    302302        State::getCameraTargetNode()->setParentSoft(this->travelNode);
    303         State::getCameraTargetNode()->setRelCoorSoft(0,0,0);
     303        State::getCameraTargetNode()->setRelCoorSoft(5,0,1);
    304304
    305305
  • branches/presentation/src/world_entities/weapons/laser_cannon.cc

    r9127 r9131  
    1 
    2 
    31/*
    42   orxonox - the future of 3D-vertical-scrollers
     
    2119#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WEAPON
    2220
    23 #include "test_gun.h"
     21#include "laser_cannon.h"
    2422#include "world_entities/projectiles/projectile.h"
    2523
     
    3331#include "fast_factory.h"
    3432
    35 CREATE_FACTORY(TestGun, CL_TEST_GUN);
     33CREATE_FACTORY(LaserCannon, CL_LASER_CANNON);
    3634
    3735/**
     
    4038   creates a new weapon
    4139*/
    42 TestGun::TestGun ( int leftRight)
     40LaserCannon::LaserCannon ( int leftRight)
    4341  : Weapon()
    4442{
     
    9189
    9290
    93 TestGun::TestGun(const TiXmlElement* root)
     91LaserCannon::LaserCannon(const TiXmlElement* root)
    9492{
    9593  this->init();
     
    10199 *  standard deconstructor
    102100*/
    103 TestGun::~TestGun ()
     101LaserCannon::~LaserCannon ()
    104102{
    105103  // model will be deleted from WorldEntity-destructor
     
    107105
    108106
    109 void TestGun::init()
    110 {
    111   this->setClassID(CL_TEST_GUN, "TestGun");
    112 
    113 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
    114 
    115   this->loadModel("models/guns/test_gun.obj");
     107void LaserCannon::init()
     108{
     109  this->setClassID(CL_LASER_CANNON, "LaserCannon");
     110
     111//  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/laser_cannon.obj", OBJ, RP_CAMPAIGN);
     112
     113  this->loadModel("models/guns/laser_cannon.obj");
    116114
    117115  this->setStateDuration(WS_SHOOTING, .1);
     
    135133
    136134
    137 void TestGun::loadParams(const TiXmlElement* root)
     135void LaserCannon::loadParams(const TiXmlElement* root)
    138136{
    139137  Weapon::loadParams(root);
     
    149147   been armed out.
    150148*/
    151 void TestGun::activate()
     149void LaserCannon::activate()
    152150{
    153151}
     
    161159   been armed out.
    162160*/
    163 void TestGun::deactivate()
     161void LaserCannon::deactivate()
    164162{
    165163}
     
    172170   @todo: the ObjectManager deliveres Projectiles not TestBullets! this should be diffrent
    173171*/
    174 void TestGun::fire()
     172void LaserCannon::fire()
    175173{
    176174  Projectile* pj =  this->getProjectile();
     
    192190 *  this will draw the weapon
    193191*/
    194 void TestGun::draw () const
     192void LaserCannon::draw () const
    195193{
    196194  /* draw gun body */
  • branches/presentation/src/world_entities/weapons/laser_cannon.h

    r9127 r9131  
    2121
    2222
    23 #ifndef _TEST_GUN_H
    24 #define _TEST_GUN_H
     23#ifndef _LASER_CANNON_H
     24#define _LASER_CANNON_H
    2525
    2626#include "weapon.h"
     
    3535
    3636
    37 class TestGun : public Weapon
     37class LaserCannon : public Weapon
    3838  {
    3939  public:
    40     TestGun (int leftRight);
    41     TestGun (const TiXmlElement* root);
    42     virtual ~TestGun ();
     40    LaserCannon (int leftRight);
     41    LaserCannon (const TiXmlElement* root);
     42    virtual ~LaserCannon ();
    4343
    4444    void init();
     
    5757    int leftRight;   // this will become an enum
    5858  };
    59 #endif /* _TEST_GUN_H */
     59#endif /* _LASER_CANNON_H */
Note: See TracChangeset for help on using the changeset viewer.