2
image = 'data/player-null.png',
8
self.movementScale = self.height / 32
9
--print(self.movementScale)
11
--self.scale = self.scaleHeight / self.height
12
--self.width = self.height * .826
13
--self.width = self.width * self.scale
16
onStartFrame = function(self)
17
local ms = self.movementScale
18
if DEBUG and the.console.visible then
23
if the.keys:pressed('up') then
24
self.velocity.y = -100 * ms
25
elseif the.keys:pressed('down') then
26
self.velocity.y = 100 * ms
31
if the.keys:pressed('right') then
32
self.velocity.x = 100 * ms
33
elseif the.keys:pressed('left') then
34
self.velocity.x = -100 * ms
40
onUpdate = function(self, dt)
41
self:collide(the.view)
43
onEndFrame = function(self)
44
if self.y < self.minY then
47
if self.y > self.maxY then
b'\\ No newline at end of file'