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