Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2008, 4:13:10 PM (16 years ago)
Author:
polakma
Message:

WeaponSystem, Projectile (kompiliert nicht)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapon/src/orxonox/objects/SpaceShip.cc

    r2049 r2060  
    142142
    143143        this->radarObject_ = static_cast<WorldEntity*>(this);
     144
     145        //WeaponSystem
     146        weaponSystem_ = new WeaponSystem();
     147        WeaponSet * weaponSet1 = new WeaponSet(1);
     148        this->weaponSystem_->attachWeaponSet(weaponSet1);
     149        this->weaponSystem_->getWeaponSetPointer(0)->getWeaponSlotPointer(0)->setAmmoType(true);
     150
    144151    }
    145152
     
    474481        if (this->bLMousePressed_ && this->timeToReload_ <= 0)
    475482        {
    476 
    477             BillboardProjectile* projectile = new ParticleProjectile(this);
    478             projectile->setColour(this->getProjectileColour());
    479             projectile->create();
    480             if (projectile->getClassID() == 0)
    481             {
    482               COUT(3) << "generated projectile with classid 0" <<  std::endl; // TODO: remove this output
    483             }
    484 
    485             projectile->setObjectMode(0x3);
     483            this->weaponSystem_->fire(0);
    486484            this->timeToReload_ = this->reloadTime_;
    487485        }
Note: See TracChangeset for help on using the changeset viewer.