Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 3, 2012, 6:05:24 PM (13 years ago)
Author:
landauf
Message:

replaced tabs with spaces (no code changed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h

    r9271 r9272  
    2626 *
    2727 */
    28          
     28
    2929 /**
    30         @brief
    31         GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
    32          
    33         @ingroup TowerDefense
     30    @brief
     31        GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
     32
     33    @ingroup TowerDefense
    3434 */
    35          
     35
    3636
    3737#ifndef _TowerDefense_H__
     
    4040#include "towerdefense/TowerDefensePrereqs.h"
    4141#include "gametypes/Deathmatch.h"
    42                  
     42
    4343 #include "TowerDefensePlayerStats.h"
    44                  
     44
    4545namespace orxonox
    4646{
    47         class _TowerDefenseExport TowerDefense : public Deathmatch
     47    class _TowerDefenseExport TowerDefense : public Deathmatch
    4848    {
    49         public:
    50                 TowerDefense(BaseObject* creator);
    51                 virtual ~TowerDefense();
    52                
    53                 virtual void start(); //<! The function is called when the gametype starts
    54                 virtual void end();
    55                 virtual void tick(float dt);
    56                 //virtual void playerEntered(PlayerInfo* player);
    57                 //virtual bool playerLeft(PlayerInfo* player);
    58                
    59                 //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
    60                 //virtual void playerScored(PlayerInfo* player);
    61                
    62                
    63                 /*      Called by TowerDefenseCenterpoint upon game start
    64                         The centerpoint is used to create towers
    65                 */
    66                 void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
    67                
    68                 /* Adds a tower at x, y in the playfield */
    69                 void addTower(int x, int y);
    70                
    71                 /* Part of a temporary hack to allow the player to add towers */
    72                 ConsoleCommand* dedicatedAddTower_;
    73                
    74                 //TODO: void spawnNewWave()
    75             //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
    76                 //      or spawn a new wave when the old wave has been killed           (event driven)
     49    public:
     50        TowerDefense(BaseObject* creator);
     51        virtual ~TowerDefense();
     52
     53        virtual void start(); //<! The function is called when the gametype starts
     54        virtual void end();
     55        virtual void tick(float dt);
     56        //virtual void playerEntered(PlayerInfo* player);
     57        //virtual bool playerLeft(PlayerInfo* player);
     58
     59        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
     60        //virtual void playerScored(PlayerInfo* player);
    7761
    7862
    79         private:
    80                 TowerDefenseCenterpoint *center_;
    81                
    82                 /* handles stats */
    83                 TowerDefensePlayerStats *stats_;
    84                 bool hasEnoughCreditForTower(TowerCost towerCost);
    85        
    86                 bool towerExists(int x, int y);
    87                
    88                 typedef struct {
    89                         int x;
    90                         int y;
    91                 } Coordinate;
    92                
    93                 std::vector<Coordinate> addedTowersCoordinates_;
    94                 std::vector<Tower*> towers_;
     63        /*  Called by TowerDefenseCenterpoint upon game start
     64            The centerpoint is used to create towers
     65        */
     66        void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
     67
     68        /* Adds a tower at x, y in the playfield */
     69        void addTower(int x, int y);
     70
     71        /* Part of a temporary hack to allow the player to add towers */
     72        ConsoleCommand* dedicatedAddTower_;
     73
     74        //TODO: void spawnNewWave()
     75        //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
     76        //      or spawn a new wave when the old wave has been killed           (event driven)
     77
     78
     79    private:
     80        TowerDefenseCenterpoint *center_;
     81
     82        /* handles stats */
     83        TowerDefensePlayerStats *stats_;
     84        bool hasEnoughCreditForTower(TowerCost towerCost);
     85
     86        bool towerExists(int x, int y);
     87
     88        typedef struct {
     89            int x;
     90            int y;
     91        } Coordinate;
     92
     93        std::vector<Coordinate> addedTowersCoordinates_;
     94        std::vector<Tower*> towers_;
    9595    };
    9696}
Note: See TracChangeset for help on using the changeset viewer.