add aseprite into the mix
This commit is contained in:
parent
e75cc60376
commit
5affd98436
|
@ -23,9 +23,8 @@
|
|||
nativeBuildInputs = [
|
||||
just
|
||||
lua-language-server
|
||||
nushell
|
||||
pixelorama
|
||||
playdate-sdk-pkg
|
||||
tup
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
5
justfile
5
justfile
|
@ -8,6 +8,5 @@ alias s := simu
|
|||
simu: build
|
||||
PlaydateSimulator {{ bin }}
|
||||
|
||||
alias pxl := pixelorama
|
||||
pixelorama:
|
||||
pixelorama
|
||||
cook-assets:
|
||||
@(which aseprite > /dev/null) || (echo "Missing aseprite program"; exit 1)
|
||||
|
|
BIN
src/img/level_01.aseprite
Normal file
BIN
src/img/level_01.aseprite
Normal file
Binary file not shown.
|
@ -19,10 +19,6 @@ function gameInit()
|
|||
atlas = gfx.imagetable.new("img/bg_atlas")
|
||||
end
|
||||
|
||||
-- Now we'll call the function above to configure our game.
|
||||
-- After this runs (it just runs once), nearly everything will be
|
||||
-- controlled by the OS calling `playdate.update()` 30 times a second.
|
||||
|
||||
gameInit()
|
||||
|
||||
function playdate.update()
|
||||
|
@ -31,17 +27,18 @@ function playdate.update()
|
|||
-- Note that it is possible for more than one of these directions
|
||||
-- to be pressed at once, if the user is pressing diagonally.
|
||||
|
||||
local speed = 5
|
||||
if playdate.buttonIsPressed(playdate.kButtonUp) then
|
||||
playerSprite:moveBy(0, -2)
|
||||
end
|
||||
if playdate.buttonIsPressed(playdate.kButtonRight) then
|
||||
playerSprite:moveBy(2, 0)
|
||||
playerSprite:moveBy(speed, 0)
|
||||
end
|
||||
if playdate.buttonIsPressed(playdate.kButtonDown) then
|
||||
playerSprite:moveBy(0, 2)
|
||||
end
|
||||
if playdate.buttonIsPressed(playdate.kButtonLeft) then
|
||||
playerSprite:moveBy(-2, 0)
|
||||
playerSprite:moveBy(-speed, 0)
|
||||
end
|
||||
|
||||
-- Call the functions below in playdate.update() to draw sprites and keep
|
||||
|
|
Loading…
Reference in a new issue