Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2017, 3:53:52 PM (7 years ago)
Author:
jkindle
Message:

added some structire. Next to do, fix Centerpoint and error when compiling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SuperOrxoBros_FS17/src/modules/superorxobros/SOB.h

    r11370 r11378  
    2121 *
    2222 *   Author:
    23  *      Florian Zinggeler
     23 *      Fabian 'x3n' Landau
    2424 *   Co-authors:
    2525 *      ...
     
    2828
    2929/**
    30     @file Invader.h
    31     @brief Gametype.
    32     @ingroup Invader
     30    @file Pong.h
     31    @brief Declaration of the Pong class.
     32    @ingroup Pong
    3333*/
    3434
    35 #ifndef _Invader_H__
    36 #define _Invader_H__
     35#ifndef _SOB_H__
     36#define _SOB_H__
    3737
    38 #include "invader/InvaderPrereqs.h"
     38#include "superorxobros/SOBPrereqs.h"
     39
     40#include "tools/Timer.h"
    3941
    4042#include "gametypes/Deathmatch.h"
    41 #include "tools/Timer.h"
     43#include "SOBCenterpoint.h"
    4244
    4345namespace orxonox
    4446{
    4547
    46     class _InvaderExport Invader : public Deathmatch
     48 
     49    class _SOBExport SOB : public Deathmatch
    4750    {
    4851        public:
    49             Invader(Context* context);
     52            SOB(Context* context); //!< Constructor. Registers and initializes the object.
     53            virtual ~SOB(); //!< Destructor. Cleans up, if initialized.
    5054
    51             virtual void start() override;
    52             virtual void end() override;
    53             virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
     55       
     56            void setCenterpoint(SOBCenterpoint* center)
     57                { this->center_ = center; }
     58            void setFigureTemplate(const std::string& newTemplate)
     59                { this->figureTemplate_ = newTemplate; }
     60           
     61            const std::string& getFigureTemplate() const
     62                { return this->figureTemplate_; }
     63       
     64         
     65        protected:
     66       
    5467
    55             void spawnEnemy();
    56 
    57             void setCenterpoint(InvaderCenterPoint* center);
    58 
    59             int getLives(){return this->lives;}
    60             int getLevel(){return this->level;}
    61             int getPoints(){return this->point;}
    62             int getMultiplier(){return this->multiplier;}
    63 
    64             void costLife();
    65             void levelUp();
    66             void addPoints(int numPoints);
    67             // checks if multiplier should be reset.
    68             void comboControll();
    69             int lives;
    70             int multiplier;
    71             bool bEndGame;
    72             bool bShowLevel;
    73         private:
    74             void toggleShowLevel(){bShowLevel = !bShowLevel;}
    75             InvaderShip* getPlayer();
    76             WeakPtr<InvaderCenterPoint> center_;
    77             WeakPtr<InvaderShip> player;
    78 
    79             Timer enemySpawnTimer;
    80             Timer comboTimer;
    81             Timer showLevelTimer;
    82             //Context* context;
    83             int level;
    84             int point;
    85             bool b_combo;
     68            void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats.
     69             WeakPtr<SOBCenterpoint> center_;
     70            WeakPtr<SOBFigure> figure_;
     71            WeakPtr<Camera> camera;
     72         
    8673    };
    8774}
    8875
    89 #endif /* _Invader_H__ */
     76#endif /* _Pong_H__ */
Note: See TracChangeset for help on using the changeset viewer.