Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2008, 7:10:08 PM (16 years ago)
Author:
rgrieder
Message:

TutorialShip should now do basic stuff.

File:
1 edited

Legend:

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

    r1850 r1855  
    6464    SetConsoleCommand(SpaceShip, movePitch, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
    6565    SetConsoleCommand(SpaceShip, moveRoll, true).accessLevel(AccessLevel::User).defaultValue(0, 1.0f).axisParamIndex(0).keybindMode(KeybindMode::OnHold);
    66     SetConsoleCommand(SpaceShip, fire, true).accessLevel(AccessLevel::User).keybindMode(KeybindMode::OnHold);
     66    //SetConsoleCommand(SpaceShip, fire, true).accessLevel(AccessLevel::User).keybindMode(KeybindMode::OnHold);
    6767    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setMaxSpeed", 1, false).accessLevel(AccessLevel::Debug);
    6868    SetConsoleCommandAliasMulti(SpaceShip, setMaxSpeedTest, "setMaxBlubber", 2, false).accessLevel(AccessLevel::Debug);
     
    258258
    259259            // START CREATING ADDITIONAL EFFECTS
    260             /*this->backlight_ = new Backlight(this->maxSpeed_, 0.8);
    261             this->attachObject(this->backlight_);
    262             this->backlight_->setPosition(-2.35, 0, 0.2);
    263             this->backlight_->setColour(this->getProjectileColour());
    264 
    265             this->smoke_ = new ParticleSpawner();
    266             this->smoke_->setParticle("Orxonox/smoke5", LODParticle::normal, 0, 0, 3);
    267             this->attachObject(this->smoke_);
    268 
    269             this->fire_ = new ParticleSpawner();
    270             this->fire_->setParticle("Orxonox/fire3", LODParticle::normal, 0, 0, 1);
    271             this->attachObject(this->fire_);
    272             */
     260            if (this->hasSpecialEffects())
     261            {
     262                this->backlight_ = new Backlight(this->maxSpeed_, 0.8);
     263                this->attachObject(this->backlight_);
     264                this->backlight_->setPosition(-2.35, 0, 0.2);
     265                this->backlight_->setColour(this->getProjectileColour());
     266
     267                this->smoke_ = new ParticleSpawner();
     268                this->smoke_->setParticle("Orxonox/smoke5", LODParticle::normal, 0, 0, 3);
     269                this->attachObject(this->smoke_);
     270
     271                this->fire_ = new ParticleSpawner();
     272                this->fire_->setParticle("Orxonox/fire3", LODParticle::normal, 0, 0, 1);
     273                this->attachObject(this->fire_);
     274            }
    273275            // END CREATING ADDITIONAL EFFECTS
    274276
    275             if (this->isExactlyA(Class(SpaceShip)))
     277            if (!this->isExactlyA(Class(SpaceShipAI)))
    276278            {
    277279                // START of testing crosshair
     
    300302    {
    301303        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
    302         SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
     304        //SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
     305        reloadTime_ = 9999999.9f;
    303306        SetConfigValue(testvector_, Vector3()).description("asdfblah");
    304307    }
     
    376379        COUT(4) << "requesting focus for camera" << std::endl;
    377380        //CameraHandler::getInstance()->requestFocus(cam_);
    378         if(this->isExactlyA(Class(SpaceShip))){
     381        if(!this->isExactlyA(Class(SpaceShipAI))){
    379382          getFocus();
    380383          COUT(4) << "getting focus for obj id: " << objectID << std::endl;
     
    484487
    485488            projectile->setObjectMode(0x3);
    486             this->timeToReload_ = this->reloadTime_;
     489            this->timeToReload_ = this->getReloadTime();
    487490        }
    488491
Note: See TracChangeset for help on using the changeset viewer.