Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2014, 3:58:59 PM (11 years ago)
Author:
sriedel
Message:

Working atm. including function after function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.h

    r10117 r10118  
    3838#include "dodgerace2/DodgeRacePrereqs.h"
    3939
     40#include "core/CoreIncludes.h"
     41#include "core/XMLPort.h"
    4042#include "worldentities/pawns/SpaceShip.h"
    4143#include "graphics/Camera.h"
    4244#include "weapons/projectiles/Projectile.h"
    43 //#include "DodgeRace.h"
     45
     46#include "DodgeRace.h" // Is necessary for getGame function
    4447//#include "DodgeRaceCenterPoint.h"
    4548
    4649namespace orxonox
    4750{
    48     class DodgeRaceShip : public SpaceShip
     51    class _DodgeRaceExport DodgeRaceShip : public SpaceShip
    4952    {
    5053        public:
     
    5457
    5558            // overwrite for 2d movement
    56             virtual void moveFrontBack(const Vector2& value);
    57             virtual void moveRightLeft(const Vector2& value);
     59                    virtual void moveFrontBack(const Vector2& value);
     60                    virtual void moveRightLeft(const Vector2& value);
    5861
    59             // Starts or stops fireing
    60             virtual void boost(bool bBoost);
     62                    // Starts or stops fireing
     63                    virtual void boost(bool bBoost);
    6164
    62             //no rotation!
    63             virtual void rotateYaw(const Vector2& value){};
    64             virtual void rotatePitch(const Vector2& value){};
    65             //return to main menu if game has ended.
    66             virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();};
     65                    //no rotation!
     66                    virtual void rotateYaw(const Vector2& value){};
     67                    virtual void rotatePitch(const Vector2& value){};
    6768
    68             virtual void updateLevel();
     69                    //return to main menu if game has ended.
     70                    virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();};
     71
     72                    virtual void updateLevel();
     73
     74            float speed, damping, posforeward;
     75            bool isFireing;
     76
     77        private:
     78            WeakPtr<DodgeRace> getGame();
     79            WeakPtr<DodgeRace> game;
     80            Camera* camera;
     81            float lastTimeFront, lastTimeLeft, lastTime;
     82            struct Velocity
     83            {
     84                           float x;
     85                           float y;
     86            } velocity, desiredVelocity;
     87
     88
     89
     90
     91/*
     92
    6993
    7094            //virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
     
    7498
    7599        private:
    76             WeakPtr<DodgeRace> getGame();
    77             WeakPtr<DodgeRace> game;
    78             Camera* camera;
    79             bool isFireing;
    80             float speed, damping, posforeward;
    81             float lastTimeFront, lastTimeLeft, lastTime;
    82             struct Velocity
    83             {
    84                 float x;
    85                 float y;
    86             } velocity, desiredVelocity;
     100
     101
     102
     103
     104
     105
    87106
    88107           // WeakPtr<DodgeRaceEnemy> lastEnemy;
    89             WeakPtr<Projectile> lastShot;
     108            WeakPtr<Projectile> lastShot;*/
    90109
    91110    };
Note: See TracChangeset for help on using the changeset viewer.