Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 29, 2012, 12:52:05 PM (12 years ago)
Author:
mentzerf
Message:
  • Fixed some formatting, some comments and some logs. Done for today.
Location:
code/branches/newlevel2012/src/modules/towerdefense
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.cc

    r9138 r9139  
    8383    TowerDefense::~TowerDefense()
    8484    {
     85                /* Part of a temporary hack to allow the player to add towers */
    8586        if (this->isInitialized())
    8687        {
     
    9293        void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
    9394        {
    94                 orxout() << "got a centerpoint..." << endl;
    95                
     95                orxout() << "Centerpoint now set..." << endl;
    9696                this->center_ = centerpoint;
    9797        }
     
    101101        Deathmatch::start();
    102102               
    103         orxout()<< "Adding towers for debug..." <<endl;
    104                
    105                 addTower(0,15);
    106                 addTower(15,0);
    107                
     103        orxout() << "Adding towers for debug..." << endl;
     104               
     105                // Mark corners
     106                addTower(0,15); addTower(15,0);
     107               
     108                // Mark diagonal line
    108109                for (int i = 0 ; i <= 15; i++)
    109                 {
    110110                        addTower(i,i);
    111                 }
    112                
    113                 orxout()<< "Done" <<endl;
     111               
     112                orxout() << "Done" << endl;
    114113               
    115114                ChatManager::message("Use the console command addTower x y to add towers");
    116     }
    117        
    118         /*
    119          void TowerDefense::end()
    120          {
    121          Deathmatch::end();
    122          
    123          std::string message("The match has ended.");
    124          ChatManager::message(message);
    125          }
    126          */
     115        }
     116       
     117        void TowerDefense::end()
     118        {
     119                Deathmatch::end();
     120         
     121                ChatManager::message("Match is over");
     122        }
     123       
    127124       
    128125        void TowerDefense::addTower(int x, int y)
  • code/branches/newlevel2012/src/modules/towerdefense/TowerDefense.h

    r9136 r9139  
    5050                //virtual void playerScored(PlayerInfo* player);
    5151               
     52                /*      Called by TowerDefenseCenterpoint upon game start
     53                        The centerpoint is used to create towers
     54                */
    5255                void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
    5356               
     57                /* Adds a tower at x, y in the playfield */
     58                void addTower(int x, int y);
     59               
    5460                /* Part of a temporary hack to allow the player to add towers */
    55                 void addTower(int x, int y);
    5661                ConsoleCommand* dedicatedAddTower_;
    5762               
Note: See TracChangeset for help on using the changeset viewer.