aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/init.lua')
-rw-r--r--Scripts/init.lua28
1 files changed, 16 insertions, 12 deletions
diff --git a/Scripts/init.lua b/Scripts/init.lua
index 60f21c6..4f2c93a 100644
--- a/Scripts/init.lua
+++ b/Scripts/init.lua
@@ -4,32 +4,36 @@ player = {
Player = 0,
EventListeners = {
MoveLeftPressed = function(self)
- --self.Velocity.x = self.Velocity.x - 3.0
- self.Velocity.y = self.Velocity.y - 1.0
+ self.Velocity.x = self.Velocity.x - 3.0
self.Render.flipx = true;
end,
MoveLeftReleased = function(self)
-- TODO can't put text at world coordinates right now
--game.puts("default", self.Position.x, self.Position.y+100, "Hey. Hag?")
- --self.Velocity.x = self.Velocity.x + 3.0
- self.Velocity.y = self.Velocity.y + 1.0
+ self.Velocity.x = self.Velocity.x + 3.0
end,
MoveRightPressed = function(self)
- --self.Velocity.x = self.Velocity.x + 3.0
- self.Velocity.y = self.Velocity.y + 1.0
+ self.Velocity.x = self.Velocity.x + 3.0
self.Render.flipx = false;
end,
MoveRightReleased = function(self)
- --self.Velocity.x = self.Velocity.x - 3.0
- self.Velocity.y = self.Velocity.y - 1.0
+ self.Velocity.x = self.Velocity.x - 3.0
end,
JumpKeyPressed = function(self)
- if self.Physics.standing == true then
- game.play(self.Position, self.Audio)
- self.Velocity.y = self.Velocity.y + 9
- end
+ -- if self.Physics.standing == true then
+ -- game.play(self.Position, self.Audio)
+ -- self.Velocity.y = self.Velocity.y + 9
+ -- end
+ self.Velocity.y = self.Velocity.y + 3.0
end,
JumpKeyReleased = function(self)
+ self.Velocity.y = self.Velocity.y - 3.0
+ end,
+ CrouchKeyPressed = function(self)
+ self.Velocity.y = self.Velocity.y - 3.0
+ end,
+ CrouchKeyReleased = function(self)
+ self.Velocity.y = self.Velocity.y + 3.0
end
},
Position = {