This commit is contained in:
Alexey 2024-10-31 17:39:35 +03:00
commit 0556f63d2d
119 changed files with 2908 additions and 0 deletions

View file

@ -0,0 +1,9 @@
damage = 1;
speed = 12;
lenX=0;
lenY=0;
x1 = 0;
x2 = 0;
y1 = 0;
y2 = 0;
owner = obSpaceship;

View file

@ -0,0 +1,8 @@
if owner = obSpaceship
{
draw_line_color(x1, y1, x2, y2, global.playerColor, global.playerColor);
}
else
{
draw_line_color(x1, y1, x2, y2, global.faction2Color, global.faction2Color);
}

View file

@ -0,0 +1 @@
instance_destroy();

View file

@ -0,0 +1,37 @@
lenX = lengthdir_x(8, direction);
lenY = lengthdir_y(8, direction);
x1 = x + lenX;
x2 = x - lenX;
y1 = y + lenY;
y2 = y - lenY;
if collision_line(x1, y1, x2, y2, obSpacestation, true, false)
{
instance_destroy();
}
if collision_line(x1, y1, x2, y2, obEnemy, true, false)
{
instance_nearest(x, y, obEnemy).shipHealth -= damage;
instance_destroy();
}
if collision_line(x1, y1, x2, y2, obSpaceship, true, false)
{
if obSpaceship.shipShield >= damage
{
obSpaceship.shipShield -= damage;
obSpaceship.alarm[5] = obSpaceship.shield.shieldDelay * room_speed;
}
else if obSpaceship.shipShield < damage and obSpaceship.shield > 0
{
damage -= obSpaceship.shipShield;
obSpaceship.shipShield = 0;
obSpaceship.alarm[5] = obSpaceship.shield.shieldDelay * room_speed;
obSpaceship.shipHealth -= damage;
}
else
{
obSpaceship.shipHealth -= damage;
}
instance_destroy();
}

View file

@ -0,0 +1,36 @@
{
"resourceType": "GMObject",
"resourceVersion": "1.0",
"name": "obLaser",
"eventList": [
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":8,"isDnD":false,},
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,},
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,},
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":7,"isDnD":false,},
],
"managed": true,
"overriddenProperties": [],
"parent": {
"name": "Objects",
"path": "folders/Objects.yy",
},
"parentObjectId": null,
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 1,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": [],
"physicsStartAwake": true,
"properties": [],
"solid": false,
"spriteId": null,
"spriteMaskId": null,
"visible": true,
}