Add project code

This commit is contained in:
Andrew Trieu
2025-04-20 15:57:23 +03:00
committed by Andrew Trieu
commit 3fbd0e4977
612 changed files with 11196 additions and 0 deletions

26
objects/o_hud/Step_0.gml Normal file
View File

@@ -0,0 +1,26 @@
if global.first_start {
menu_inst = instance_create_depth(0, 0, -10000, o_start_menu)
}
if global.start_key_pressed && instance_exists(menu_inst) {
instance_destroy(menu_inst);
}
// Get player's hp
if instance_exists(o_player) {
player_hp = o_player.hp;
player_max_hp = o_player.max_hp;
} else {
player_hp = 0;
}
if (global.weapon_notification_timer > 0) {
global.weapon_notification_timer--;
if (global.weapon_notification_timer <= 0) {
global.weapon_notification = "";
}
}
if (global.enemyKillCount >= global.enemyRoomMax) {
instance_create_depth(0, 0, -10000, o_end_screen);
}