Add more menus and endless mode
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
depth = -9000;
|
||||
|
||||
global.first_start = true;
|
||||
|
||||
player_hp = 0;
|
||||
player_max_hp = 0;
|
||||
|
||||
global.enemyRoomMax = 100;
|
||||
global.enemyActiveMax = 20;
|
||||
global.totalEnemiesSpawned = 0;
|
||||
global.enemyKillCount = 0;
|
||||
global.enemy_room_max = 100;
|
||||
global.enemy_active_max = 20;
|
||||
global.total_enemies_spawned = 0;
|
||||
global.kill_count = 0;
|
||||
|
||||
global.first_start = true;
|
||||
global.current_score = 0;
|
||||
load_high_score();
|
||||
|
||||
global.infinite_mode = false;
|
||||
|
||||
// Weapon pickup
|
||||
global.weapon_notification = "";
|
||||
|
||||
@@ -22,8 +22,12 @@ if instance_exists(o_player) && !instance_exists(o_screen_pause) {
|
||||
draw_set_halign(fa_left);
|
||||
draw_set_valign(fa_top);
|
||||
draw_set_font(fnt_Tiny5);
|
||||
draw_text_transformed(_hud_x + 28, _hud_y + 23, string(global.enemyKillCount) , 0.5, 0.5, 0);
|
||||
draw_text_transformed(_hud_x + 49, _hud_y + 23, " / " + string(global.enemyRoomMax), 0.5, 0.5, 0);
|
||||
|
||||
draw_text_transformed(_hud_x + 28, _hud_y + 23, string(global.kill_count) , 0.5, 0.5, 0);
|
||||
|
||||
if !global.infinite_mode {
|
||||
draw_text_transformed(_hud_x + 49, _hud_y + 23, " / " + string(global.enemy_room_max), 0.5, 0.5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw notification if active
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
global.totalEnemiesSpawned = 0;
|
||||
global.enemyKillCount = 0;
|
||||
global.total_enemies_spawned = 0;
|
||||
global.kill_count = 0;
|
||||
|
||||
global.weapon_notification = "";
|
||||
global.weapon_notification_timer = 0;
|
||||
@@ -1,11 +1,3 @@
|
||||
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;
|
||||
@@ -21,6 +13,10 @@ if (global.weapon_notification_timer > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
if (global.enemyKillCount >= global.enemyRoomMax) {
|
||||
if (global.kill_count >= global.enemy_room_max) {
|
||||
if (global.current_score >= global.high_score) {
|
||||
global.high_score = global.current_score;
|
||||
save_high_score();
|
||||
}
|
||||
instance_create_depth(0, 0, -10000, o_end_screen);
|
||||
}
|
||||
Reference in New Issue
Block a user