fix: don't jump at minigame start
This commit is contained in:
parent
70ed18202d
commit
e8e5ba9a76
3 changed files with 13 additions and 3 deletions
|
@ -18,7 +18,7 @@ function PlayStyle:new(supportedLevels, missionfile)
|
|||
self:initMission()
|
||||
self:initCharacters()
|
||||
|
||||
self:startLevel()
|
||||
self.haveStarted = false
|
||||
end
|
||||
|
||||
function PlayStyle:loadMissionFile(supportedLevels, missionfile)
|
||||
|
@ -44,7 +44,15 @@ function PlayStyle:getCharacterName(charID)
|
|||
end
|
||||
|
||||
function PlayStyle:update(dt)
|
||||
if (self.haveStarted) then
|
||||
PlayStyle.super.update(self, dt)
|
||||
self:updatePauseMenus(dt)
|
||||
else
|
||||
self:startLevel()
|
||||
end
|
||||
end
|
||||
|
||||
function PlayStyle:updatePauseMenus(dt)
|
||||
if self.menusystem.menus["pauseMenu"].isActive == false then
|
||||
self.timer = self.timer + dt
|
||||
end
|
||||
|
@ -68,6 +76,7 @@ function PlayStyle:update(dt)
|
|||
end
|
||||
|
||||
function PlayStyle:startLevel()
|
||||
self.haveStarted = true
|
||||
self.world:loadMap()
|
||||
--self.assets:playMusic()
|
||||
end
|
||||
|
|
|
@ -31,7 +31,7 @@ function Player:updateStart(dt)
|
|||
|
||||
self:basicMovements()
|
||||
|
||||
if self.keys["A"].isDown and (self.onGround) then
|
||||
if self.keys["A"].isPressed and (self.onGround) then
|
||||
self.zsp = 280*1.33
|
||||
end
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ function menu.SceneWidget:new(scene, menuName, newScene, newSceneName, sceneArgu
|
|||
end
|
||||
|
||||
function menu.SceneWidget:action()
|
||||
self.scene:flushKeys()
|
||||
if (self.sceneArgument ~= nil) then
|
||||
self.newScene(self.sceneArgument)
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue