Made kamikaze behavior and also fixed borders

This commit is contained in:
2ndbeam 2024-05-05 18:20:34 +03:00
commit 1ee0b529a8
10 changed files with 41 additions and 44 deletions

View file

@ -13,10 +13,7 @@ height = 16384
scroll_offset = Vector2(681.667, 317.783)
stars_amount = 4000
[node name="SystemBorder" parent="Background" index="0"]
default_color = Color(1, 1, 1, 1)
[node name="Nebula" parent="Background" index="1" node_paths=PackedStringArray("tracked_node")]
[node name="Nebula" parent="Background" index="0" node_paths=PackedStringArray("tracked_node")]
tracked_node = NodePath("../../FactionPlayer/PlayerShip")
color_background = Color(0.276474, 0.0962249, 0.200656, 1)
@ -28,4 +25,4 @@ position = Vector2(19, 10)
position = Vector2(7171, -28)
[node name="KamikazeShip" parent="FactionAggressive" index="0" instance=ExtResource("4_i6rbg")]
position = Vector2(687, -302)
position = Vector2(147, 92)

View file

@ -25,7 +25,7 @@ func _ready():
resource_name = "get_border_points"
script/source = "extends Line2D
@onready var star_system = get_parent().get_parent()
@onready var star_system = get_parent()
func _ready():
var halved_width = star_system.width / 2
@ -65,14 +65,6 @@ script = SubResource("GDScript_4yoh5")
process_mode = 1
layer = -10
[node name="SystemBorder" type="Line2D" parent="Background"]
z_index = -99
points = PackedVector2Array(0, 0, 1280, 0, 1280, 720, 0, 720)
closed = true
width = 8.0
default_color = Color(1, 1, 1, 0.521569)
script = SubResource("GDScript_r38d8")
[node name="Nebula" type="ColorRect" parent="Background"]
z_index = -100
material = ExtResource("4_o0ld7")
@ -99,3 +91,11 @@ faction = 3
[node name="FactionAggressive" type="Node" parent="."]
script = ExtResource("7_wm3vi")
faction = 4
[node name="SystemBorder" type="Line2D" parent="."]
z_index = -99
points = PackedVector2Array(0, 0, 1280, 0, 1280, 720, 0, 720)
closed = true
width = 8.0
default_color = Color(1, 1, 1, 0.521569)
script = SubResource("GDScript_r38d8")