/// @description Insert description here
// You can write your code in this editor
room_speed=60
image_speed=0.1
walk_direction=0
walk_speed=0
stat_walk_speed=8
depth=0
mouse_direction=0
side=1
reload=0
wep_id=0//Начальное оружие
wep_sprite=weapon_stats(wep_id,3)
wep_reload=weapon_stats(wep_id,2)
wep_damage=weapon_stats(wep_id,1)
wep_name=weapon_stats(wep_id,0)
wep_direction=point_direction(sprite_get_xoffset(wep_sprite),sprite_get_yoffset(wep_sprite),weapon_stats(wep_id,4),weapon_stats(wep_id,5))
wep_distance=point_distance(2*sprite_get_xoffset(wep_sprite),2*sprite_get_yoffset(wep_sprite),2*weapon_stats(wep_id,4),2*weapon_stats(wep_id,5))
hp=100
globalvar player;
player=id
/*wall_surf=surface_create(1024,1024)
element_count=40
for(i=0;i<element_count;i++)
{
el_text[i]=text_random()
el_x[i]=random(1024) 
el_y[i]=random(768) 
alpha[i]=random(1)
el_speed[i]=random_range(2,5)
}*/
globalvar camera;
view_camera[0]=camera_create_view(0,0,1024,768,0,id,-1,-1,512,388)
view_enabled=1
view_visible[0]=1
view_hport[0]=768
view_wport[0]=1024
wave=0

wave_timer=300
if hero=1 then 
{
spr_left=spr_gg_left
spr_right=spr_gg_right
spr_down=spr_gg_down
spr_up=spr_gg_up
}
if hero=2 then 
{
spr_left=spr_gg_left_2
spr_right=spr_gg_right_2
spr_down=spr_gg_down_2
spr_up=spr_gg_up_2
}
spawn_x[0]=900
spawn_y[0]=600
spawn_x[1]=2300
spawn_y[1]=1400
spawn_x[2]=400
spawn_y[2]=3750
spawn_x[3]=3260
spawn_y[3]=2940
spawn_x[4]=3300
spawn_y[4]=500
enemy_number=0
t=0
enemy=0
en_dir=0
/*
ENEMIES
0 - normal
1 - indian
2 - boom
3 - masked
4 - armored
5 - cyborg
*/
wave_ad=0
skill_reload=0
dash_dir=0
dash=0
ammo_rifle=0
ammo_auto=0
invinc_timer=0
globalvar inv;
inv=30
alp=1
audio_stop_sound(music)
music=audio_play_sound(music_game1,1,1)
globalvar pause;
pause=0
globalvar screen;
screen=surface_create(1024,768)