Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 7, 2007, 12:39:30 AM (16 years ago)
Author:
rgrieder
Message:
 
File:
1 edited

Legend:

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

    r169 r177  
    4040  {
    4141  public:
    42     WeaponManager(Ogre::SceneManager*, Ogre::SceneNode*, int);
     42    enum Action {
     43      NOTHING  = 0,
     44      RELOAD   = 1,
     45      ZOOM_IN  = 2,
     46      ZOOM_OUT = 3
     47    };
     48
     49  protected:
     50    enum State {
     51      IDLE = 0,
     52      PRIMARY_FIRE = 1,
     53      SECONDARY_FIRE = 2,
     54      RELOADING = 4
     55    };
     56
     57  public:
     58    WeaponManager(Ogre::SceneManager*, Ogre::SceneNode*, BulletManager*, int);
    4359          virtual ~WeaponManager();
    4460
    4561    bool addWeapon(const Ogre::String&);
    4662
     63    bool addAction(const Action);
     64
     65    void primaryFireRequest();
     66
     67    void secondaryFireRequest();
     68
     69    bool tick(unsigned long, Ogre::Real);
     70
    4771    bool static loadWeapons();
    4872
    4973    void static destroyWeapons();
     74
     75  protected:
     76    void primaryFire();
     77
     78    void secondaryFire();
     79
     80  public:
    5081
    5182  protected:
     
    5687    int slotSize_;
    5788    int slotIndex_;
     89    int selectedWeapon_;
     90
     91    int bulletCounter_;
     92    BulletManager *bulletManager_;
     93
     94    bool primaryFireRequest_;
     95    bool secondaryFireRequest_;
     96
     97    State currentState_;
     98
     99    Action *actionList_;
     100    int actionListReadIndex_;
     101    int actionListWriteIndex_;
    58102
    59103    static Weapon **weaponList_s;
Note: See TracChangeset for help on using the changeset viewer.