equal
deleted
inserted
replaced
41 --Theme = "Hell" |
41 --Theme = "Hell" |
42 end |
42 end |
43 |
43 |
44 |
44 |
45 function onGameStart() |
45 function onGameStart() |
46 ShowMission(loc("TUMBLER"), "a Hedgewars mini-game", "- Use the arrow keys to move|- Use [enter] and [backspace] to fire", 4, 4000) |
46 ShowMission("TUMBLER", "a Hedgewars mini-game", "- Use the arrow keys to move|- Use [enter] and [backspace] to fire", 4, 4000) |
47 end |
47 end |
48 |
48 |
49 function onHJump() |
49 function onHJump() |
50 if (shotsLeft > 0) and (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then -- seems to not work with a hedgehog nil chek |
50 if (shotsLeft > 0) and (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then -- seems to not work with a hedgehog nil chek |
51 shotsLeft = shotsLeft - 1 |
51 shotsLeft = shotsLeft - 1 |
162 end |
162 end |
163 end |
163 end |
164 |
164 |
165 if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then |
165 if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then |
166 |
166 |
167 --AddCaption(loc("Speed: ") .. GetSpeed()) |
167 --AddCaption(LOC_NOT("Speed: ") .. GetSpeed()) |
168 |
168 |
169 -- Calculate and display turn time |
169 -- Calculate and display turn time |
170 TimeLeftCounter = TimeLeftCounter + 1 |
170 TimeLeftCounter = TimeLeftCounter + 1 |
171 if TimeLeftCounter == 1000 then |
171 if TimeLeftCounter == 1000 then |
172 TimeLeftCounter = 0 |
172 TimeLeftCounter = 0 |
179 |
179 |
180 end |
180 end |
181 |
181 |
182 --if TimeLeft >= 0 then |
182 --if TimeLeft >= 0 then |
183 -- --TurnTimeLeft = TimeLeft |
183 -- --TurnTimeLeft = TimeLeft |
184 -- AddCaption(loc("Time Left: ") .. TimeLeft) |
184 -- AddCaption(LOC_NOT("Time Left: ") .. TimeLeft) |
185 --end |
185 --end |
186 |
186 |
187 --ShowMission(loc("TUMBLER"), loc("v0.2"), loc("Speed: ") .. GetSpeed() .. "|" .. loc("Ammo: ") .. shotsLeft, 4, 0) |
187 --ShowMission("TUMBLER", "v0.2", LOC_NOT("Speed: ") .. GetSpeed() .. "|" .. LOC_NOT("Ammo: ") .. shotsLeft, 4, 0) |
188 |
188 |
189 if TimeLeft == 0 then |
189 if TimeLeft == 0 then |
190 stopMovement = true |
190 stopMovement = true |
191 upOn = false |
191 upOn = false |
192 down = false |
192 down = false |