Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2007, 12:44:02 AM (16 years ago)
Author:
rgrieder
Message:
  • modified the AmmunitionDump to hold different types of ammo
  • converted the RunManager into a Singleton
  • added some methods to address ammo by string
  • created a BaseWeapon class
  • derived BarrelGun from BaseWeapon
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/main_reto_vs05/src/run_manager.h

    r194 r232  
    3333#include "OgreWindowEventUtilities.h"
    3434#include "OgreTextureManager.h"
     35#include "OgreSingleton.h"
    3536
    3637#include <OIS/OISPrereqs.h>
     
    4344  // let the class inherit from WindowEventListener in order for the RunMgr
    4445  // to act as the central point of all the calcuations in Orxonox
    45   class RunManager : Ogre::WindowEventListener
     46  class RunManager : public Ogre::WindowEventListener,
     47                     public Ogre::Singleton<RunManager>
    4648  {
    4749  public:
    48           RunManager(OgreControl*);
     50    RunManager(OgreControl*);
    4951
    50           virtual ~RunManager();
     52    virtual ~RunManager();
     53    //void initialise(OgreControl*);
    5154
    52     virtual bool tick(unsigned long, Ogre::Real);
     55    bool tick(unsigned long, Ogre::Real);
     56
     57    Ogre::SceneManager& getSceneManager();
     58
     59    Ogre::SceneManager* getSceneManagerPtr();
     60
     61    weapon::BulletManager* getBulletManagerPtr();
     62
     63    int getAmmunitionID(const Ogre::String&);
     64
     65    int getNumberOfAmmos();
     66
     67    static RunManager& getSingleton(void);
     68
     69    static RunManager* getSingletonPtr(void);
     70
    5371
    5472  protected:
    55           virtual void createCamera(void);
     73          void createCamera(void);
    5674
    57           virtual void createViewports(void);
     75          void createViewports(void);
    5876
    5977
     
    6179
    6280          //Adjust mouse clipping area
    63           virtual void windowResized(Ogre::RenderWindow*);
     81          void windowResized(Ogre::RenderWindow*);
    6482
    6583          //Unattach OIS before window shutdown (very important under Linux)
    66           virtual void windowClosed(Ogre::RenderWindow*);
     84          void windowClosed(Ogre::RenderWindow*);
    6785
    6886
    6987          /** INPUT PROCESSING **/
    70           virtual bool processUnbufferedKeyInput();
     88          bool processUnbufferedKeyInput();
    7189
    72           virtual bool processUnbufferedMouseInput();
     90          bool processUnbufferedMouseInput();
    7391
    7492
    7593          /** OUTPUT **/
    7694
    77           virtual void updateStats(void);
     95          void updateStats(void);
    7896
    79           virtual void showDebugOverlay(bool);
     97          void showDebugOverlay(bool);
    8098
    8199  protected:
Note: See TracChangeset for help on using the changeset viewer.