Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 5, 2008, 7:57:16 PM (15 years ago)
Author:
polakma
Message:

added firemodes and a lot of other things

File:
1 edited

Legend:

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

    r2106 r2145  
    4545namespace orxonox
    4646{
     47
    4748    WeaponSystem::WeaponSystem(BaseObject* creator) : BaseObject(creator)
    4849    {
     
    5152        this->activeWeaponSet_ = 0;
    5253        this->parentSpaceShip_ = 0;
     54        //this->attachedMunition_ =0;
    5355    }
    5456
     
    5759    }
    5860
    59     //creates empty weaponSet
    6061    void WeaponSystem::attachWeaponSet(WeaponSet *wSet)
    6162    {
     
    6465    }
    6566
     67/*
    6668    //the first weaponSet is at n=0
    6769    void WeaponSystem::setActiveWeaponSet(unsigned int n)
     
    6971        if (n < this->weaponSets_.size())
    7072            this->activeWeaponSet_ = this->weaponSets_[n];
     73        else
     74            this->activeWeaponSet_ = this->weaponSets_[0];
    7175    }
     76*/
    7277
    7378    //n is the n'th weaponSet, starting with zero
    74     //Spaceship.cc only needs to have the keybinding to a specific Set-number n
    75     void WeaponSystem::fire(unsigned int n)
     79    //SpaceShip.cc only needs to have the keybinding to a specific Set-number n
     80    void WeaponSystem::fire(WeaponMode::Enum n)
    7681    {
    7782        if (n < this->weaponSets_.size())
     
    7984    }
    8085
    81     void WeaponSystem::fire()
    82     {
    83         if (this->activeWeaponSet_)
    84             this->activeWeaponSet_->fire();
    85     }
    8686
    8787    WeaponSet * WeaponSystem::getWeaponSetPointer(unsigned int n)
     
    9898    }
    9999
     100    /*
     101    void WeaponSystem::addMunitionType(Munition *munitionPointer)
     102    {
     103
     104
     105        if (munitionPointer != NULL)  //gewährleiste, dass munitionPointer auf etwas sinnvolles zeigt
     106            this->attachedMunition_ = munitionPointer;
     107        else
     108            this->unlimitedAmmo_ = true;
     109
     110    }
     111    */
     112
    100113}
Note: See TracChangeset for help on using the changeset viewer.