Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2008, 4:45:50 PM (17 years ago)
Author:
polakma
Message:

added munition, fixed reloadTimer_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/WeaponSystem.h

    r2186 r2203  
    3939namespace orxonox
    4040{
    41     //put here all existing munitionTypes
    42     namespace MunitionType
    43     {
    44         enum Enum
    45         { laserGunMunition };
    46     }
    47 
    48     //put here all weapon fire modes.
    49     //they have to be added to Pawn and HumanController, too.
    50     namespace WeaponMode
    51     {
    52         enum Enum
    53         { fire, altFire, altFire2 };
    54     }
    5541
    5642    class _OrxonoxExport WeaponSystem : public BaseObject
     
    6349
    6450            void attachWeaponSet(WeaponSet *wSet);
    65             void addMunitionType(Munition *munitionPointer);
    6651            void fire();
    6752            void fire(WeaponMode::Enum fireMode);
    6853            //void setActiveWeaponSet(unsigned int n);
    6954            WeaponSet * getWeaponSetPointer(unsigned int n);
    70             Munition * getAttachedMunitionPointer();
     55
     56            void setNewMunition(std::string munitionType, Munition * munitionToAdd);
     57            Munition * getMunitionType(std::string munitionType);
    7158
    7259            inline void setParentSpaceShip(SpaceShip *parentSpaceShip)
     
    7865        private:
    7966            std::vector<WeaponSet *> weaponSets_;
    80             std::map<MunitionType::Enum,Munition *> munitionSet_;
     67            std::map<std::string, Munition *> munitionSet_;
    8168            WeaponSet *activeWeaponSet_;
    8269            SpaceShip *parentSpaceShip_;
    83             Munition * attachedMunition_;
    8470    };
    8571}
Note: See TracChangeset for help on using the changeset viewer.