diff --git a/Sokoban/Data/GameObjects/Barrel/Barrel.lua b/Sokoban/Data/GameObjects/Barrel/Barrel.lua index 14488a8..725fd2d 100644 --- a/Sokoban/Data/GameObjects/Barrel/Barrel.lua +++ b/Sokoban/Data/GameObjects/Barrel/Barrel.lua @@ -56,7 +56,7 @@ function Object:move(direction) --end end -function Event.Game.Update(dt) +function Event.Game.Update(event) if Object.activated == false and Terrain.elements[Object.pos.y+1][Object.pos.x+1][1]:getType() == "Objective" then Object.activated = true; This.Sprite:loadTexture("Sprites/GameObjects/Barrel/Barrel_activated.png"); @@ -67,9 +67,9 @@ function Event.Game.Update(dt) if Object.walking == Walking then local mx, my; if Object.bound.use == "x" then - mx, my = Object.bound.x * dt * Object.speed, 0; + mx, my = Object.bound.x * event.dt * Object.speed, 0; else - mx, my = 0, Object.bound.y * dt * Object.speed; + mx, my = 0, Object.bound.y * event.dt * Object.speed; end local move = obe.Transform.UnitVector(mx, my); This.Sprite:move(move); diff --git a/Sokoban/Data/GameObjects/Robot/Robot.lua b/Sokoban/Data/GameObjects/Robot/Robot.lua index 7060435..2485363 100644 --- a/Sokoban/Data/GameObjects/Robot/Robot.lua +++ b/Sokoban/Data/GameObjects/Robot/Robot.lua @@ -54,7 +54,7 @@ function InitializeBindings() end end -function Event.Game.Update(dt) +function Event.Game.Update(event) if Object.walking == StartWalking then Object.bound = { x = Directions[Object.direction].x, @@ -100,9 +100,9 @@ function Event.Game.Update(dt) elseif Object.walking == Walking then local mx, my; if Object.bound.use == "x" then - mx, my = Object.bound.x * dt * Object.speed, 0; + mx, my = Object.bound.x * event.dt * Object.speed, 0; else - mx, my = 0, Object.bound.y * dt * Object.speed; + mx, my = 0, Object.bound.y * event.dt * Object.speed; end local move = obe.Transform.UnitVector(mx, my); This.Sprite:move(move); diff --git a/Sokoban/Data/GameObjects/Robot/Robot.obj.vili b/Sokoban/Data/GameObjects/Robot/Robot.obj.vili index 17ffeb3..fba99cd 100644 --- a/Sokoban/Data/GameObjects/Robot/Robot.obj.vili +++ b/Sokoban/Data/GameObjects/Robot/Robot.obj.vili @@ -1,6 +1,6 @@ Robot: Sprite: - path:"Sprites/GameObjects/Robot/Robot_DOWNd.png" + path:"Sprites/GameObjects/Robot/Robot_DOWN.png" rect: x:0.0 y:0.0 diff --git a/Sokoban/Data/config.cfg.vili b/Sokoban/Data/config.cfg.vili index ea4fced..d128842 100644 --- a/Sokoban/Data/config.cfg.vili +++ b/Sokoban/Data/config.cfg.vili @@ -1,11 +1,8 @@ -KeyBinding: +Input: game: UP:"Hold:Z" LEFT:"Hold:Q" RIGHT:"Hold:D" DOWN:"Hold:S" Reset:"Pressed:R" - Next:"Pressed:Return" - -Debug: - logLevel:1 \ No newline at end of file + Next:"Pressed:Return" \ No newline at end of file diff --git a/Sokoban/boot.lua b/Sokoban/boot.lua index 36823ce..fe006a7 100644 --- a/Sokoban/boot.lua +++ b/Sokoban/boot.lua @@ -1,7 +1,3 @@ -function Popipo() - print("POPIPO") -end - function Game.Start() Engine.Scene:loadFromFile("Data/Maps/Menu.map.vili"); end \ No newline at end of file