You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bfd68ad
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/part3/the-player.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
The player’s logic is pretty simple. The player can move in 4 directions and fire bullets. We update the player by checking our input directions and the A button. We’ll move in the proper direction if its associated d-pad button is pressed. If the A button is pressed, we’ll spawn a new bullet at the player’s position.
4
4
5
5
Our player will have 3 variables:
6
-
-wePlayerPositionX - a 16-bit scaled integer
7
-
-wePlayerPositionY - a 16-bit scaled integer
6
+
-wPlayerPositionX - a 16-bit scaled integer
7
+
-wPlayerPositionY - a 16-bit scaled integer
8
8
- wPlayerFlash - a 16-bit integer used when the player gets damaged
9
9
10
10
:::warning Note
@@ -19,15 +19,15 @@ These are declared at the top of the "src/main/states/gameplay/objects/player.as
Well draw our player, a simple ship, using the previously discussed metasprites implementation. Here is what we have for the players metasprites and tile data:
22
+
We'll draw our player, a simple ship, using the previously discussed metasprites implementation. Here is what we have for the players metasprites and tile data:
0 commit comments