Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12391


Ignore:
Timestamp:
May 16, 2019, 4:57:28 PM (6 years ago)
Author:
jeromela
Message:

Zielvisier eingefuegt

Location:
code/branches/OrxoBlox_FS19
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw

    r12378 r12391  
    1616  include("templates/spaceshipPirate.oxt")
    1717  include("templates/spaceshipOrxoBlox.oxt")
     18  include("templates/spaceshipEscort.oxt")
    1819?>
    1920
     
    8687    <!-- <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> -->
    8788    <Light type=directional position="-100, 10000, -700" direction="0.2, -1, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
    88     <SpawnPoint team=0 position="0,-4.5,49" lookat="0,0,0" spawnclass= OrxoBloxShip pawndesign=spaceshipOrxoBlox/>
     89    <SpawnPoint team=0 position="0,-4.5,49" lookat="0,0,0" spawnclass= SpaceShip pawndesign=spaceshipOrxoBlox/>
     90
     91    <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort /--->
    8992
    9093    <!--<Model mesh="axes.mesh" scale=10 position="0,0,0" /> -->
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc

    r12384 r12391  
    332332    }
    333333   
     334    void OrxoBlox::tick(float dt)
     335    {       
     336        SUPER(OrxoBlox, tick, dt);
     337    }
    334338/*
    335339    bool OrxoBlox::Intersect(int XpositionBall, int XPositionBlock, int YPositionBall, int YPositionBlock, int radiusBall, int sizeBlock) {
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h

    r12371 r12391  
    7676            // void spawnPlayer(PlayerInfo* Player) override;
    7777            virtual void playerPreSpawn(PlayerInfo* player) override;
    78 
     78            virtual void tick(float dt) override;
    7979
    8080            void LevelUp();
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc

    r12370 r12391  
    6969    void OrxoBloxShip::tick(float dt)
    7070    {
    71         SUPER(OrxoBloxShip, tick, dt);
    7271        Vector3 pos = this->getPosition();
     72
     73        //ensure that the ship stays in playing field
     74        if(pos.x > width/2)   pos.x = -width/2;
     75        if(pos.x < -width/2)  pos.x = width/2;
     76        if(pos.z > height/2)  pos.z = -height/2;
     77        if(pos.z < -height/2) pos.z = height/2;
     78
     79        //2D movement, position should always = 0 on y-axis
     80        if(pos.y!=0) pos.y = 0;
    7381        this->setPosition(pos);
     82
     83
     84        //if you hit an asteroid, the ship will turn -> you need to reorientate the ship
     85        Quaternion ort = this->getOrientation();
     86        ort.x = 0;
     87        ort.z = 0;
     88        this->setOrientation(ort);
    7489    }   
    7590
  • code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h

    r12370 r12391  
    5353            //virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
    5454            //Yaw
     55            virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
    5556            virtual void rotateRoll(const Vector2& value) override{}; // Rotate in roll direction.
    5657            virtual void boost(bool boost) override; //Override, so that the ship does not shake
     58           
    5759           
    5860            /*Functions that can be helpful while debugging.
     
    6971            }
    7072
    71         protected:
     73        //protected:
    7274        private:
    7375            OrxoBlox* getGame();
  • code/branches/OrxoBlox_FS19/src/modules/asteroids2D/Asteroids2DShip.cc

    r11781 r12391  
    6969    void Asteroids2DShip::tick(float dt)
    7070    {
    71         SUPER(Asteroids2DShip, tick, dt);
     71        //SUPER(Asteroids2DShip, tick, dt);
    7272        Vector3 pos = this->getPosition();
    7373
Note: See TracChangeset for help on using the changeset viewer.