Created
October 7, 2022 21:05
-
-
Save Achie72/7e905ae1e2b44a2e608732b0dab3f233 to your computer and use it in GitHub Desktop.
TIC-80 Player Movement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- variable to save if the player is moving | |
-- in a direction sideways, for us to make | |
-- the ship lean in said way | |
leaning = 0 | |
if btn(0) then | |
y=y-speed | |
end | |
if btn(1) then | |
y=y+speed | |
end | |
if btn(2) then | |
x=x-speed | |
leaning = -1 | |
end | |
if btn(3) then | |
x=x+speed | |
leaning = 1 | |
end | |
if btn(5) and (nextShoot < t) then | |
--shooting code | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment