Changeset 198 for code/branches/main_reto_vs05/src/orxonox_ship.cc
- Timestamp:
- Nov 13, 2007, 9:25:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/main_reto_vs05/src/orxonox_ship.cc
r194 r198 36 36 #include "weapon/bullet.h" 37 37 #include "weapon/bullet_manager.h" 38 #include "weapon/weapon_manager.h" 38 #include "weapon/weapon_station.h" 39 #include "weapon/base_weapon.h" 40 #include "weapon/ammunition_dump.h" 39 41 40 42 #include "orxonox_ship.h" … … 68 70 OrxonoxShip::OrxonoxShip(SceneManager *sceneMgr, SceneNode *node, 69 71 BulletManager *bulletManager) 70 : sceneMgr_(sceneMgr), //currentSpeed_(Vector3(0, 0, 0)),72 : sceneMgr_(sceneMgr), 71 73 baseThrust_(1000), currentThrust_(Vector3::ZERO), 72 objectCounter_(0), bulletManager_(bulletManager) //, bulletSpeed_(400)74 objectCounter_(0), bulletManager_(bulletManager) 73 75 { 74 76 rootNode_ = new InertialNode(node, Vector3::ZERO); … … 84 86 if (mainWeapon_) 85 87 delete mainWeapon_; 88 if (railGunStation_) 89 delete railGunStation_; 86 90 if (rootNode_) 87 91 delete rootNode_; … … 111 115 112 116 // initialise weapon(s) 117 ammoDump_ = new AmmunitionDump(420); 118 ammoDump_->store(420); 119 113 120 InertialNode *mainWeaponNode = rootNode_->createChildNode(); 114 mainWeapon_ = new WeaponManager(sceneMgr_, mainWeaponNode, 115 bulletManager_, 1); 116 mainWeapon_->addWeapon("Barrel Gun"); 121 mainWeapon_ = new BaseWeapon(sceneMgr_, mainWeaponNode, 122 bulletManager_, ammoDump_); 123 124 railGunStation_ = new WeaponStation(4); 125 railGunStation_->addWeapon(mainWeapon_); 126 railGunStation_->selectWeapon(0); 117 127 118 128 return true; … … 198 208 * @return Bullet containing speed and entity. 199 209 */ 200 WeaponManager* OrxonoxShip::getMainWeapon()210 BaseWeapon* OrxonoxShip::getMainWeapon() 201 211 { 202 212 return mainWeapon_; 213 } 214 215 216 int OrxonoxShip::getAmmoStock() 217 { 218 return ammoDump_->getStockSize(); 203 219 } 204 220
Note: See TracChangeset
for help on using the changeset viewer.