Changeset 10350
- Timestamp:
- Apr 6, 2015, 10:40:54 PM (10 years ago)
- Location:
- code/branches/core7/src/modules/towerdefense
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/modules/towerdefense/TowerDefense.cc
r10348 r10350 91 91 namespace orxonox 92 92 { 93 static const std::string __CC_addTower_name = "addTower"; 94 static const std::string __CC_upgradeTower_name = "upgradeTower"; 95 96 SetConsoleCommand("TowerDefense", __CC_addTower_name, &TowerDefense::addTower ).addShortcut().defaultValues(1); 97 SetConsoleCommand("TowerDefense", __CC_upgradeTower_name, &TowerDefense::upgradeTower).addShortcut().defaultValues(0); 98 93 99 RegisterUnloadableClass(TowerDefense); 94 100 … … 107 113 //this->stats_ = new TowerDefensePlayerStats(); 108 114 109 /* Temporary hack to allow the player to add towers and upgrade them */ 110 this->dedicatedAddTower_ = new ConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) ); 111 this->dedicatedUpgradeTower_ = new ConsoleCommand( "upgradeTower", createExecutor( createFunctor(&TowerDefense::upgradeTower, this) ) ); 115 ModifyConsoleCommand(__CC_addTower_name).setObject(this); 116 ModifyConsoleCommand(__CC_upgradeTower_name).setObject(this); 112 117 } 113 118 … … 117 122 if (this->isInitialized()) 118 123 { 119 if( this->dedicatedAddTower_ )120 delete this->dedicatedAddTower_;124 ModifyConsoleCommand(__CC_addTower_name).setObject(NULL); 125 ModifyConsoleCommand(__CC_upgradeTower_name).setObject(NULL); 121 126 } 122 127 } -
code/branches/core7/src/modules/towerdefense/TowerDefense.h
r10258 r10350 85 85 86 86 void upgradeTower(int x, int y); 87 /* Part of a temporary hack to allow the player to add towers */88 ConsoleCommand* dedicatedAddTower_;89 ConsoleCommand* dedicatedUpgradeTower_;90 87 91 88 //TODO: void spawnNewWave()
Note: See TracChangeset
for help on using the changeset viewer.