-
-
Save videlais/8f5c0fedbba491a8adbe to your computer and use it in GitHub Desktop.
Game variables for BasicPlatformer
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
var map; // The tilemap | |
var layer; // A layer within a tileset | |
var player; // The player-controller sprite | |
var facing = "left"; // Which direction the character is facing (default is 'left') | |
var cursors; // A reference to the keys to use for input detection | |
var jumpButton; // A reference to the button used for jumping | |
var hozMove = 160; // The amount to move horizontally | |
var vertMove = -120; // The amount to move vertically (when 'jumping') | |
var jumpTimer = 0; // The initial value of the timer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment