twinblade-infinity/objects/ctrl_hud/Draw_0.gml

95 lines
3.6 KiB
Plaintext
Raw Normal View History

draw_healthbar(__view_get( e__VW.XView, 0 )+135+160,__view_get( e__VW.YView, 0 )+305+160,__view_get( e__VW.XView, 0 )+410+160,__view_get( e__VW.YView, 0 )+315+160,(global.time)/(900+50*global.level)*100,c_white,c_orange,c_orange,0,false,false);
draw_healthbar(__view_get( e__VW.XView, 0 )+33,__view_get( e__VW.YView, 0 )+10,__view_get( e__VW.XView, 0 )+418,__view_get( e__VW.YView, 0 )+23,(global.player_hp)/(global.hplvl*25*12)*100,c_white,c_red,c_red,0,false,false);
draw_background(bg_hudoverlay,__view_get( e__VW.XView, 0 ),__view_get( e__VW.YView, 0 ));
draw_set_color(c_white);
draw_set_font(fnt_arial_s10_italic);
draw_text(__view_get( e__VW.XView, 0 )+315,__view_get( e__VW.YView, 0 )+10,string_hash_to_newline(ceil(global.player_hp/12)));
draw_text(__view_get( e__VW.XView, 0 )+343,__view_get( e__VW.YView, 0 )+10,string_hash_to_newline("/"));
draw_text(__view_get( e__VW.XView, 0 )+347,__view_get( e__VW.YView, 0 )+10,string_hash_to_newline(global.hplvl*25));
draw_set_color(c_black);
if global.stock_item = 4
{
draw_sprite(hud_nova,image_index,__view_get( e__VW.XView, 0 )+440+160,__view_get( e__VW.YView, 0 )+280+160);
}
if global.stock_item = 1
{
draw_sprite(hud_hyper,image_index,__view_get( e__VW.XView, 0 )+440+160,__view_get( e__VW.YView, 0 )+280+160);
}
if global.stock_item = 2
{
draw_sprite(hud_shield,image_index,__view_get( e__VW.XView, 0 )+440+160,__view_get( e__VW.YView, 0 )+280+160);
}
if global.stock_item = 3
{
draw_sprite(hud_restore,image_index,__view_get( e__VW.XView, 0 )+440+160,__view_get( e__VW.YView, 0 )+280+160);
}
__background_set( e__BG.X, 0, .9*__view_get( e__VW.XView, 0 )-50 )
__background_set( e__BG.Y, 0, .9*__view_get( e__VW.YView, 0 )-50 )
__background_set( e__BG.X, 1, .8*__view_get( e__VW.XView, 0 )-20 )
__background_set( e__BG.Y, 1, .8*__view_get( e__VW.YView, 0 )-20 )
__background_set( e__BG.X, 2, .7*__view_get( e__VW.XView, 0 )-500 )
__background_set( e__BG.Y, 2, .7*__view_get( e__VW.YView, 0 )-500 )
draw_set_font(fnt_arial_s18_italic);
draw_text(__view_get( e__VW.XView, 0 )+72,__view_get( e__VW.YView, 0 )+52,string_hash_to_newline(global.level));
draw_text(__view_get( e__VW.XView, 0 )+72,__view_get( e__VW.YView, 0 )+52,string_hash_to_newline(global.level));
draw_set_font(fnt_arial_s10_italic);
draw_text(__view_get( e__VW.XView, 0 )+124,__view_get( e__VW.YView, 0 )+27,string_hash_to_newline(score));
draw_text(__view_get( e__VW.XView, 0 )+124,__view_get( e__VW.YView, 0 )+27,string_hash_to_newline(score));
draw_set_font(fnt_arial_s8_italic);
draw_text(__view_get( e__VW.XView, 0 )+350+160,__view_get( e__VW.YView, 0 )+340+160,string_hash_to_newline(((900+50*global.level)-global.time)/30));
if global.message = 4
{
scr_messages("HP increase! +25 Max HP");
}
if global.message = 5
{
scr_messages("Wave Complete!");
}
if global.message = 6
{
scr_messages("Game Over... Tap to continue...");
global.gameover = 1;
}
if global.message = 7
{
scr_messages("Welcome to INFINITY!");
}
if global.message = 8
{
scr_messages("You can move by pressing the arrow keys");
}
if global.message = 9
{
scr_messages("and use powerup items by pressing the spacebar!");
}
if global.message = 10
{
scr_messages("Well, have fun~<3");
}
if global.gameover = 1
{
global.game += 1
}
if global.game = 20
{
screen_refresh();
mouse_wait();
io_clear();
}
var __b__;
__b__ = action_if_variable(global.game, 20, 0);
if __b__
{
{
obsolete(-1, 1, 255, 0, Arial,10,0,0,1,0,0);
sound_stop_all()
action_restart_game();
}
}