Changeset 11181
- Timestamp:
- May 10, 2016, 12:29:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bindermFS16/src/orxonox/LevelManager.cc
r11180 r11181 53 53 { 54 54 this->won = false; 55 this->nextLevels.insert(this->nextLevels.begin(), -1);55 this->nextLevels.insert(this->nextLevels.begin(),1); 56 56 } 57 57 … … 63 63 int LevelManager::missionactivate(int index) 64 64 { 65 return index+1;66 67 65 68 66 if (allLevelStatus_[index].won) … … 70 68 71 69 //check if level is activated 72 for(unsigned int i= 1;i<allLevelStatus_.size();i++)70 for(unsigned int i=0;i<allLevelStatus_.size();i++) 73 71 { 74 72 std::vector<int> nextLevels=allLevelStatus_[i].nextLevels; … … 79 77 80 78 //check if level visible but not activated 81 for(unsigned int i= 1;i<allLevelStatus_.size();i++)79 for(unsigned int i=0;i<allLevelStatus_.size();i++) 82 80 { 83 81 std::vector<int> nextLevels=allLevelStatus_[i].nextLevels; … … 86 84 return 2; 87 85 }; 88 return false;86 return 0; 89 87 } 90 88 … … 102 100 LevelStatus level; 103 101 allLevelStatus_.assign (10,level); 104 allLevelStatus_[1].won=true; 102 allLevelStatus_[0].won=true; 103 104 105 allLevelStatus_[1].nextLevels.push_back(2); 106 allLevelStatus_[1].nextLevels.push_back(2); 107 allLevelStatus_[1].nextLevels.push_back(1); 108 allLevelStatus_[1].nextLevels.push_back(2); 109 105 110 106 111 }
Note: See TracChangeset
for help on using the changeset viewer.