36 lines
No EOL
1.4 KiB
Text
36 lines
No EOL
1.4 KiB
Text
randomize(); //рандомизировать...рандом.
|
|
|
|
stars = round(sqrt(room_width * room_height / 100) ) + irandom_range(50, 75)
|
|
|
|
global.bindAccelerate = ord("W");
|
|
global.bindDeaccelerate = ord("S");
|
|
global.bindFire = vk_space;
|
|
global.bindTurnLeft = ord("A");
|
|
global.bindTurnRight = ord("D");
|
|
global.bindTurbo = vk_lshift;
|
|
|
|
global.movementType = 0;//0 - мышь, 1 - клава
|
|
global.money = 0;
|
|
|
|
global.playerColor = make_color_hsv(random(255), irandom_range(128, 255), 255);
|
|
global.faction1Color = make_color_hsv(random(255), irandom_range(128, 255), 255);
|
|
global.faction2Color = make_color_hsv(random(255), irandom_range(128, 255), 255);
|
|
|
|
repeat(stars)
|
|
{
|
|
instance_create_layer(random(room_width), random(room_height), "Stars", obStar); //создание звёзд на фоне
|
|
}
|
|
|
|
if room = rMain
|
|
{
|
|
spaceship = instance_create_layer(room_width/2, room_height/2, "Instances", obSpaceship); //создание корабля
|
|
cursor = instance_create_layer(x, y, "Instances", obCursor); // создание курсора
|
|
station1 = instance_create_layer(irandom_range(576, room_width-576), irandom_range(576, room_height-576), "Instances", obSpacestation); //1 станция
|
|
}
|
|
|
|
window_set_cursor(cr_none); //прячет оригинальный курсор
|
|
|
|
repeat(5)
|
|
{
|
|
instance_create_layer(random(room_width), random(room_height), "Instances", obEnemy)
|
|
} |