Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 9, 2005, 12:48:50 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: state is no more singleton, but static class.
This is faster, and easier to handle, because one can just say State::getBLA() and not State::getInstance()→getBLA(); ——→>> less redundant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/test_gun.h

    r4758 r4827  
    1 /*! 
     1/*!
    22    \file weapon.h
    33    \brief a weapon that a player can use
     
    1212     o slowdown-factor: this is a factor d: exp(-d*x), d is element of all positive R. it determines how fast the firing-rate will slow down. if no slowdown: d=0, the bigger d is, the faster the weapon will slow down!
    1313     o energy-consumption: this determines the energy that has to be used to produce this projectile = costs per projectile
    14    
     14
    1515    Furthermore there are some other attributes, that will help to represent a firing
    1616    weapon in this world:
    1717     o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
    1818     o shooting animation
    19      
     19
    2020*/
    2121
     
    3636  friend class World;
    3737
    38  public:
    39   TestGun (PNode* parent, const Vector& coordinate, const Quaternion& direction, int leftRight);
    40   virtual ~TestGun ();
     38  public:
     39    TestGun (PNode* parent, const Vector& coordinate, const Quaternion& direction, int leftRight);
     40    virtual ~TestGun ();
    4141
    42   virtual void activate();
    43   virtual void deactivate();
     42    virtual void activate();
     43    virtual void deactivate();
    4444
    45   virtual void fire();
    46   virtual void hit (WorldEntity* weapon, Vector* loc);
    47   virtual void destroy();
    48  
    49   virtual void tick(float time);
    50   virtual void weaponIdle();
    51   virtual void draw();
     45    virtual void fire();
     46    virtual void hit (WorldEntity* weapon, Vector* loc);
     47    virtual void destroy();
    5248
     49    virtual void tick(float time);
     50    virtual void weaponIdle();
     51    virtual void draw();
     52
     53  private:
     54    Animation3D* animation1;
     55    Animation3D* animation2;
     56    Animation3D* animation3;
     57
     58    PNode* objectComponent1;         //<! the gun is made of multiple parts, these PNodes represent their location and orientation
     59    PNode* objectComponent2;
     60    PNode* objectComponent3;
     61
     62    Vector projectileOffset;
     63    int leftRight;   // this will become an enum
    5364
    5465
Note: See TracChangeset for help on using the changeset viewer.