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
// movement variables | |
velocity = [0, 0]; | |
new_gravity = 1.5; | |
jumpspeed = 28; | |
max_velocity = [8, 32]; | |
acceleration = 2.1; | |
// get the tile map id | |
var _layer_id = layer_get_id("CollisionTiles"); | |
collision_tile_map_id = layer_tilemap_get_id(_layer_id); |
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
switch (state_) { | |
case "move": | |
#region Move State | |
// left and right movement | |
var h_input = keyboard_check(vk_right) - keyboard_check(vk_left); | |
if (h_input != 0) { | |
hspeed_ += h_input * acceleration_; | |
hspeed_ = clamp(hspeed_, -max_speed_, max_speed_); |
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
/// Create | |
// editable variables | |
acceleration_ = 1; | |
jump_height_ = 14; | |
friction_ = 0.3; | |
// control input | |
left_ = vk_left; | |
right_ = vk_right; |
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
menu_x = x; | |
menu_y = y; | |
button_h = 32; | |
button[0] = "New Game"; | |
button[1] = "Load Game"; | |
button[2] = "Options"; | |
button[3] = "Exit Game"; | |
buttons = array_length_1d(button); |
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
// Basic Variables | |
menu_x = x; | |
menu_y = y; | |
button_h = 24; | |
button_w =190; | |
button_padding = 10; | |
menu_index = 0; | |
last_selected = 0; | |
// Button Array |
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
window_center(); |
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
/// disc animation_end(sprite, image, rate); | |
// or just animation_end(); | |
/// @arg sprite | |
/// @arg image | |
/// @arg rate | |
var _sprite = sprite_index; | |
var _image = image_index; |
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
///@desc nine_slice_box(sprite, x1, y1, x2, y2); | |
///@arg sprite | |
///@arg x1 | |
///@arg y1 | |
///@arg x2 | |
///@arg y2 | |
var _size = sprite_get_width(argument0) / 3; | |
var _x1 = argument1; |
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
instance_destroy(); |
OlderNewer