Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 27, 2006, 12:03:36 PM (18 years ago)
Author:
nicolasc
Message:

finished animation on heavy blaster, started light blaster
code needs some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/weapon.h

    r10140 r10152  
    5555  WS_STATE_COUNT  =     8     //!< This must match the count of enumerations-members.
    5656} WeaponState;
    57 
    58 typedef enum
    59 {
    60   WS_SHOOTING0    = 0x00000001, //!< Fireing 1st Barrel
    61   WS_SHOOTING1    = 0x00000002, //!< Fireing 2nd Barrel
    62   WS_SHOOTING2    = 0x00000004, //!< Fireing 3rd Barrel
    63   WS_SHOOTING3    = 0x00000008, //!< Fireing 4st Barrel
    64   WS_SHOOTING4    = 0x00000010, //!< Fireing 5st Barrel
    65   WS_SHOOTING5    = 0x00000020, //!< Fireing 6st Barrel
    66   WS_SHOOTING6    = 0x00000040, //!< Fireing 7st Barrel
    67   WS_SHOOTING7    = 0x00000080, //!< Fireing 8st Barrel
    68 
    69   WS_SS_MAX       = 0x000000ff
    70 }ShootingStates;
    7157
    7258//! an enumerator defining capabilities of a WeaponSlot
     
    177163
    178164    Animation3D* getAnimation(WeaponState state, PNode* node = NULL);
    179     Animation3D* getAnimation(ShootingStates state, PNode* node = NULL);
     165    Animation3D* getAnimation(int barrel, int seg, PNode* node);
    180166    Animation3D* copyAnimation(WeaponState from, WeaponState to);
    181167
     
    190176    void debug() const;
    191177
    192    
     178    inline int getBarrels() {return this->barrels; };
     179    inline int getSegs() { return this->segs; };
     180    inline void setBarrels(int barrels) { this->barrels = barrels; };
     181    inline void setSegs(int segs) { this->segs = segs; };
     182
     183    inline Animation3D* getShootAnim(int barrel, int seg) { return this->shootAnim[barrel][seg]; };
     184    inline void setShootAnim(int barrel, int seg, PNode* component) { this->shootAnim[barrel][seg] = this->getAnimation(barrel, seg, component); };
     185
     186    void init2();
     187    void deconstr();
    193188
    194189  protected:
     
    208203
    209204
    210     inline int getBarrels() {return this->barrels; };
    211     inline int getSeg() {return this->segs; };
    212     inline void setBarrels(int barrels) { this->barrels = barrels; };
    213     inline void setSegs(int segs) { this->segs = segs; };
    214205
    215206  private:
     
    268259    int                    barrels;                         //!< # of barrels
    269260    int                    segs;                             //!< # of segments, one barrel has
     261    Animation3D***         shootAnim;
     262
    270263  };
    271264
Note: See TracChangeset for help on using the changeset viewer.