]> vgcfreebox.myrthtech.pt Git - gm-duelo.git/blob - objects/obj_player/Draw_64.gml
game conroller objs
[gm-duelo.git] / objects / obj_player / Draw_64.gml
1 var _mid_x = room_width/2;
2 var _mid_y = room_height/3;
3
4 switch(_game_state){
5 /*case GAME_STATES.WAITING:{
6 if !_p1_ready or !_p2_ready {
7 draw_set_halign(fa_center);
8 draw_text(_mid_x, _mid_y+64, _waiting_msg);
9 //draw_sprite_stretched(spr_title,0,_mid_x-172, _mid_y-64,356,128);
10 }
11 if _p1_ready {
12 draw_set_halign(fa_left);
13 draw_text(8, 2, _player1_name+" - READY");
14 }
15 if _p2_ready {
16 draw_set_halign(fa_right);
17 draw_text(room_width-8, 2, _player2_name+" - READY");
18 }
19
20 // controls
21 draw_set_halign(fa_center);
22 draw_text(_mid_x, room_height-32, " Arrows to move, Z for melee attack, X for range attack, C for special");
23
24 // player info
25 //draw_player_info();
26 break;}*/
27
28 case GAME_STATES.HERO_SELECTION:{
29 if(player_id == 0){
30 draw_set_halign(fa_left);
31 if _selected_char == noone {
32 draw_text(8, 2, player_name+" - Choosing...");
33 }else{;
34 draw_text(8, 2, player_name+" - "+string(_selected_char._name));
35 }
36
37 // player scores
38 if(player_name != "unknown" ){
39 draw_text(24, 32,"DuelsMade: "+string(_amount_of_games));
40 draw_text(24, 64,"Victories: "+string(_amount_of_victories));
41 draw_text(24, 96,"Relics : "+string(_amount_of_relics));
42 draw_text(24, 128,"Score : "+string(_my_score));
43 }else{
44 draw_text(24, 32, "Login in to OperaGX");
45 }
46 }else if(player_id == 1){
47 draw_set_halign(fa_right);
48 if _selected_char == noone {
49 draw_text(room_width-8, 2, "...Choosing - "+player_name);
50 }else{
51 draw_text(room_width-8, 2, string(_selected_char._name) +" - "+player_name);
52 }
53
54 //player scores
55 if(player_name != "unknown" ){
56 draw_text(room_width-42, 32,"DuelsMade: "+string(_amount_of_games));
57 draw_text(room_width-42, 64,"Victories: "+string(_amount_of_victories));
58 draw_text(room_width-42, 96,"Relics : "+string(_amount_of_relics));
59 draw_text(room_width-42, 128,"Score : "+string(_my_score));
60 }else{
61 draw_text(room_width-32, 32, "Login in to OperaGX");
62 }
63 }
64 break;}
65
66 case GAME_STATES.FIGHTING:{
67 var _top_y = 18;
68 if(player_id == 0){
69 draw_set_alpha(0.5);
70 draw_rectangle_color(4,4,32+string_length(_selected_char._name)*14+32,42,c_gray,c_gray,c_gray,c_gray,0);
71 draw_set_alpha(1);
72 draw_rectangle_color(4,4,32+string_length(_selected_char._name)*14+32,42,c_blue,c_blue,c_blue,c_blue,1);
73 draw_set_halign(fa_left);
74 draw_text(8, 2, "P1 - "+_selected_char._name+" ("+string( obj_game_controller._player1_victories)+")");
75
76 for(var _hp1 = 0; _hp1 < _health; _hp1++){
77 draw_sprite(spr_coracao,0,32+_hp1*16,32);
78 }
79 }
80
81 if(player_id == 1){
82 draw_set_alpha(0.5);
83 draw_rectangle_color(room_width-8, 4,room_width-(36+string_length(_selected_char._name)*14+32),42,c_gray,c_gray,c_gray,c_gray,0);
84 draw_set_alpha(1);
85 draw_rectangle_color(room_width-8, 4,room_width-(36+string_length(_selected_char._name)*14+32),42,c_orange,c_orange,c_orange,c_orange,1);
86 draw_set_halign(fa_right);
87 draw_text(room_width-8, 2, "P2 - "+_selected_char._name+" ("+string( obj_game_controller._player2_victories)+")");
88
89 for(var _hp2 = 0; _hp2 < _health; _hp2++){
90 draw_sprite(spr_coracao,0,room_width-32-_hp2*16,32);
91 }
92 }
93
94 break;}
95 }