Changeset 11186 for code/branches/bindermFS16/data/gui/scripts
- Timestamp:
- May 12, 2016, 4:07:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bindermFS16/data/gui/scripts/CampaignMenu.lua
r11180 r11186 26 26 27 27 function P.updateButton(index, button) 28 local lastMission = orxonox.LevelManager:getInstance():getLastWonMission() 29 if (lastMission == "") then 30 else 31 local lastwon =P.getIndexOfLastFinishedMission() 32 orxonox.LevelManager:getInstance():updatewon(lastwon) 33 end 34 28 35 local test =orxonox.LevelManager:getInstance():missionactivate(index) 36 29 37 if (test==1) then 30 38 button:setProperty("Visible", "True") … … 48 56 --end 49 57 50 --function P.getIndexOfLastFinishedMission()51 -- local lastMission = orxonox.LevelManager:getInstance():getLastFinishedCampaignMission()52 --if (lastMission and lastMission ~= "") then53 --local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()54 --local index = 055 --while index < size do56 --local mission = orxonox.LevelManager:getInstance():getCampaignMission(index)57 --if (mission == lastMission) then58 --return index59 --end60 --index = index + 161 --end62 --end63 --return -164 --end58 function P.getIndexOfLastFinishedMission() 59 local lastMission = orxonox.LevelManager:getInstance():getLastWonMission() 60 if (lastMission and lastMission ~= "") then 61 local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() 62 local index = 0 63 while index < size do 64 local mission = orxonox.LevelManager:getInstance():getCampaignMission(index) 65 if (mission == lastMission) then 66 return index 67 end 68 index = index + 1 69 end 70 end 71 return -1 72 end 65 73 66 74 function P.Mission1Button_clicked(e)
Note: See TracChangeset
for help on using the changeset viewer.