ludum-dare-22/objects/obj_HUD/Draw_0.gml

99 lines
3.2 KiB
Plaintext

// HUD
d3d_set_projection_ortho(0,0,1024,768,0)
d3d_set_lighting(false)
d3d_set_fog( false, c_white, 600, 3000 );
gpu_set_alphatestenable(false);
draw_set_font(fn_main)
draw_text(800,700,string_hash_to_newline("FPS: / 30"))
draw_text(900,700,string_hash_to_newline(fps))
draw_set_font(fn_big)
draw_sprite(spr_life,0,10,10)
draw_text(120,10,string_hash_to_newline(global.life))
draw_sprite(spr_bombs,0,10,84)
draw_text(120,84,string_hash_to_newline(global.bombs))
draw_set_font(fn_main)
draw_text(600,10,string_hash_to_newline("Score:"))
draw_text(600,40,string_hash_to_newline("Hi-score:"))
draw_text(750,10,string_hash_to_newline(global.scores))
if global.scores > global.hiscore
draw_text(750,40,string_hash_to_newline(global.scores))
else
draw_text(750,40,string_hash_to_newline(global.hiscore))
if global.extend > 0
{
draw_text(500,200,string_hash_to_newline("Extend!"))
global.extend -= 1
}
if global.mesmult > 0
{
draw_text(475,230,string_hash_to_newline(global.mult))
draw_text(520,230,string_hash_to_newline("multiplier!"))
global.mesmult -= 1
}
lifecount = 0
if global.death > 0
{
//fade to black
with (obj_enemymanager)
{
instance_destroy()
}
with (obj_boss1)
{
instance_destroy()
}
sound_stop_all()
d3d_set_projection_ortho(0,0,1024,768,0)
d3d_set_lighting(false)
draw_set_alpha(global.death/20)
draw_rectangle_color(-1,-1,1025,769,c_black,c_black,c_black,c_black,false)
draw_set_color(c_white)
draw_set_font(fn_main)
draw_text(100,400,string_hash_to_newline("With all your power you could not repel the annoying neighbors."))
draw_text(100,430,string_hash_to_newline("You could not be left alone, and as a result could not rest in peace."))
draw_text(100,460,string_hash_to_newline("Welcome to an eternal cacophonic hell."))
draw_text(100,520,string_hash_to_newline("Bad ending."))
draw_set_font(fn_big)
draw_text(375,200,string_hash_to_newline("Game over"))
global.death += 1
if global.death = 250
{
room_goto(rm_menu)
}
}
if global.victory > 0
{
//fade to black
with (obj_enemymanager)
{
instance_destroy()
}
with (obj_boss1)
{
instance_destroy()
}
sound_stop_all()
d3d_set_projection_ortho(0,0,1024,768,0)
draw_set_alpha(global.victory/20)
d3d_set_lighting(false)
draw_rectangle_color(-1,-1,1025,769,c_white,c_white,c_white,c_white,false)
draw_set_color(c_black)
draw_set_font(fn_main)
draw_text(100,400,string_hash_to_newline("With your power, you repeled the worthless neighbors pernamently."))
draw_text(100,430,string_hash_to_newline("You, the ghost, can finally rest peacefully, a well earned reward."))
draw_text(100,460,string_hash_to_newline("It is alone and quiet, just as you prefer."))
draw_text(100,520,string_hash_to_newline("Good ending."))
draw_set_font(fn_big)
draw_text(375,200,string_hash_to_newline("Victory"))
global.victory += 1
if global.victory = 250
{
room_goto(rm_menu)
}
}
d3d_set_lighting(true)
gpu_set_alphatestenable(true);