Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 10, 2009, 12:05:01 AM (16 years ago)
Author:
landauf
Message:

More changes in the WeaponSystem:

  • WeaponSets can now contain several WeaponPacks
  • WeaponPacks can now belong to several WeaponSets

(until now this seemingly was a 1:1 relationship… now it's n:m)

  • Started support for multiple weaponmodes
  • Added some code to the destructor of some classes… according to some legends, this helps destroying objects. (WeaponSets and WeaponPacks weren't deleted before…)

Not yet finished, but I have to synchronize desktop computer and notebook.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapons/src/orxonox/objects/weaponSystem/WeaponSlot.h

    r2912 r2914  
    4343            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4444
    45             void attachWeapon(Weapon *weapon);
    46             Weapon * getAttachedWeapon() const;
    47             void setAmmoType(bool isUnlimited);
    48             void fire();
     45            void attachWeapon(Weapon * weapon);
     46            void removeWeapon();
     47            Weapon * getWeapon() const
     48                { return this->weapon_; }
    4949
    50             inline void setWeaponSystem(WeaponSystem *weaponSystem)
     50            inline bool isOccupied() const
     51                { return (this->weapon_ != 0); }
     52
     53            inline void setWeaponSystem(WeaponSystem * weaponSystem)
    5154                { this->weaponSystem_ = weaponSystem; }
    5255            inline WeaponSystem * getWeaponSystem() const
     
    5558
    5659        private:
    57             Weapon *attachedWeapon_;
    58             bool unlimitedAmmo_;
    59 
    60             WeaponSystem *weaponSystem_;
     60            WeaponSystem * weaponSystem_;
     61            Weapon * weapon_;
    6162    };
    6263}
Note: See TracChangeset for help on using the changeset viewer.