Changeset 169 for code/branches/main_reto_vs05/src
- Timestamp:
- Nov 5, 2007, 8:43:21 PM (17 years ago)
- Location:
- code/branches/main_reto_vs05/src
- Files:
-
- 13 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/main_reto_vs05/src/ammunition_dump.cc
r161 r169 29 29 30 30 31 namespace Orxonox {31 namespace orxonox { 32 32 33 33 AmmunitionDump::AmmunitionDump() -
code/branches/main_reto_vs05/src/bullet.cc
r161 r169 33 33 34 34 35 namespace Orxonox {35 namespace orxonox { 36 36 using namespace Ogre; 37 37 38 Bullet::Bullet(SceneNode * mNode, Entity *mEntity, Vector3 mSpeed)39 : mNode(mNode), mEntity(mEntity), mSpeed(mSpeed)38 Bullet::Bullet(SceneNode *node, Entity *entity, Vector3 speed) 39 : node_(node), entity_(entity), speed_(speed) 40 40 { 41 mNode->attachObject(mEntity);41 node_->attachObject(entity_); 42 42 } 43 43 -
code/branches/main_reto_vs05/src/camera_manager.cc
r161 r169 31 31 #include "camera_manager.h" 32 32 33 namespace Orxonox {33 namespace orxonox { 34 34 using namespace Ogre; 35 35 -
code/branches/main_reto_vs05/src/main.cc
r161 r169 45 45 try { 46 46 // create an orxonox aplication and run it 47 Orxonox::Orxonox myApp;47 orxonox::Orxonox myApp; 48 48 49 49 myApp.go(); -
code/branches/main_reto_vs05/src/ogre_control.cc
r161 r169 39 39 40 40 41 namespace Orxonox {41 namespace orxonox { 42 42 using namespace Ogre; 43 43 -
code/branches/main_reto_vs05/src/orxonox.cc
r161 r169 41 41 42 42 43 namespace Orxonox {43 namespace orxonox { 44 44 45 45 /** -
code/branches/main_reto_vs05/src/orxonox_scene.cc
r161 r169 36 36 #include "orxonox_scene.h" 37 37 38 namespace Orxonox {38 namespace orxonox { 39 39 using namespace Ogre; 40 40 -
code/branches/main_reto_vs05/src/orxonox_ship.cc
r161 r169 35 35 36 36 #include "orxonox_ship.h" 37 38 namespace Orxonox { 37 #include "weapon_manager.h" 38 39 40 namespace orxonox { 39 41 using namespace Ogre; 40 42 … … 52 54 53 55 54 55 56 56 /** 57 57 * Standard constructor, that only initalizes a few variables. Some of them … … 99 99 fishNode->attachObject(shipEntity_); 100 100 fishNode->setScale(Vector3(10, 10, 10)); 101 102 // initialise weapon(s) 103 SceneNode *mainWeaponNode = rootNode_->createChildSceneNode("mainWeaponNode"); 104 mainWeapon_ = new WeaponManager(sceneMgr_, mainWeaponNode, 1); 101 105 102 106 return true; -
code/branches/main_reto_vs05/src/run_manager.cc
r161 r169 25 25 */ 26 26 27 28 /**29 * RunManager is the basic control object during the game.30 *31 * The RunManger class is designed to actually "run" the main part of the32 * game. The Idea is, that you could derive from the RunManager in order33 * to distinguish between a first person shooter or a space craft shooter.34 * RunManager loads and initialises everything in the scene (like the ship,35 * the enemies in the scene, any scripts, the physics, window events,36 * environment, HUD, etc.).37 * It also captures any input from keyboard, mous, joystick (optional) or38 * Ogre (window events).39 */40 27 41 28 #include "Ogre.h" … … 69 56 #include "run_manager.h" 70 57 71 namespace Orxonox {58 namespace orxonox { 72 59 using namespace Ogre; 60 61 /** 62 * RunManager is the basic control object during the game. 63 * 64 * The RunManger class is designed to actually "run" the main part of the 65 * game. The Idea is, that you could derive from the RunManager in order 66 * to distinguish between a first person shooter or a space craft shooter. 67 * RunManager loads and initialises everything in the scene (like the ship, 68 * the enemies in the scene, any scripts, the physics, window events, 69 * environment, HUD, etc.). 70 * It also captures any input from keyboard, mous, joystick (optional) or 71 * Ogre (window events). 72 */ 73 73 74 74 75 /** … … 240 241 for (int i = 0; i < bulletsIndex_; i++) 241 242 { 242 bullets_[i]-> mNode->translate(bullets_[i]->mSpeed*deltaTime);243 bullets_[i]-> mNode->yaw(Degree(deltaTime*100));244 bullets_[i]-> mNode->roll(Degree(deltaTime*300));243 bullets_[i]->node_->translate(bullets_[i]->speed_*deltaTime); 244 bullets_[i]->node_->yaw(Degree(deltaTime*100)); 245 bullets_[i]->node_->roll(Degree(deltaTime*300)); 245 246 } 246 247 -
code/branches/main_reto_vs05/src/weapon_manager.cc
r161 r169 28 28 #include "OgreSceneManager.h" 29 29 30 #include "weapon.h" 30 31 #include "weapon_manager.h" 31 32 32 33 33 namespace Orxonox {34 namespace orxonox { 34 35 using namespace Ogre; 35 36 36 WeaponManager::WeaponManager(SceneManager *mSceneMgr) 37 Weapon** WeaponManager::weaponList_s = NULL; 38 39 WeaponManager::WeaponManager(SceneManager *sceneMgr, SceneNode *node, 40 int slotSize) 41 : sceneMgr_(sceneMgr), node_(node), slotSize_(slotSize), slotIndex_(0) 37 42 { 38 43 slots_ = new Weapon*[slotSize]; 39 44 } 40 45 … … 42 47 WeaponManager::~WeaponManager() 43 48 { 49 if (slots_) 50 delete slots_; 51 } 52 53 54 bool WeaponManager::addWeapon(const Ogre::String &name) 55 { 56 if (name == weaponList_s[0]->name_) 57 { 58 // this is ugly, but for the time being, it has to fit. 59 slots_[slotIndex_++] = weaponList_s[0]; 60 return true; 61 } 62 else 63 return false; 64 } 65 66 67 // static 68 bool WeaponManager::loadWeapons() 69 { 70 weaponList_s[0] = new Weapon("Barrel Gun", 10, 2); 71 return true; 72 } 73 74 75 // static 76 void WeaponManager::destroyWeapons() 77 { 78 delete weaponList_s[0]; 44 79 } 45 80
Note: See TracChangeset
for help on using the changeset viewer.