Base docking system (areas don't monitor ship somehow)
This commit is contained in:
parent
ab3ac4af66
commit
739cdbe4c3
11 changed files with 190 additions and 18 deletions
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
[node name="Hull" type="RigidBody2D"]
|
||||
position = Vector2(0.5, 0)
|
||||
collision_mask = 9
|
||||
input_pickable = true
|
||||
gravity_scale = 0.0
|
||||
angular_damp = 1.0
|
||||
script = ExtResource("1_7nfg8")
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ script = ExtResource("1_o387g")
|
|||
[node name="HullHolder" type="Node" parent="."]
|
||||
|
||||
[node name="Hull" parent="HullHolder" instance=ExtResource("2_kthut")]
|
||||
collision_mask = 1
|
||||
|
||||
[node name="Engine" parent="." instance=ExtResource("3_ysnrn")]
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ process_mode = 0
|
|||
position = Vector2(19, 10)
|
||||
|
||||
[node name="Base" parent="FactionPeaceful" index="0" instance=ExtResource("3_m5ica")]
|
||||
position = Vector2(7171, -28)
|
||||
position = Vector2(1706, -5)
|
||||
|
||||
[node name="KamikazeShip" parent="FactionAggressive" index="0" instance=ExtResource("4_i6rbg")]
|
||||
position = Vector2(-444, -228)
|
||||
position = Vector2(-4961, -2446)
|
||||
|
||||
[node name="ShooterShip" parent="FactionAggressive" index="1" instance=ExtResource("5_o3ny8")]
|
||||
position = Vector2(204, 491)
|
||||
position = Vector2(-4905, 428)
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("5_la84n")
|
||||
color_background = Color(0.36, 0.18612, 0.1116, 1)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dk3nvl8f0v24e"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dk3nvl8f0v24e"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Base/base.gd" id="1_dr4wr"]
|
||||
[ext_resource type="Texture2D" uid="uid://3x77t3kd6v0x" path="res://sprites/triangle_base.png" id="1_nrkxw"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4e5h0"]
|
||||
size = Vector2(357, 4)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uwuva"]
|
||||
size = Vector2(343, 208)
|
||||
|
||||
[node name="Base" type="StaticBody2D"]
|
||||
process_mode = 1
|
||||
collision_layer = 2
|
||||
collision_mask = 7
|
||||
input_pickable = true
|
||||
script = ExtResource("1_dr4wr")
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="."]
|
||||
position = Vector2(0.5, 0.5)
|
||||
|
|
@ -14,10 +24,42 @@ texture = ExtResource("1_nrkxw")
|
|||
position = Vector2(1, -2)
|
||||
polygon = PackedVector2Array(-2, 251, -58, 275, -91, 307, -91, 414, -179, 462, -420, 488, -422, 488, -548, 468, -549, 466, -502, 343, -359, 148, -273, 95, -183, -60, -181, -161, -83, -383, -1, -483, 0, -483, 82, -383, 180, -160, 183, -58, 272, 96, 359, 149, 502, 345, 548, 466, 547, 468, 421, 488, 419, 488, 178, 462, 90, 414, 90, 308, 60, 277, 1, 251)
|
||||
|
||||
[node name="VisibleArea" type="ColorRect" parent="."]
|
||||
[node name="Gate" type="StaticBody2D" parent="."]
|
||||
collision_layer = 2
|
||||
|
||||
[node name="GateCollider" type="CollisionShape2D" parent="Gate"]
|
||||
position = Vector2(0, 458)
|
||||
shape = SubResource("RectangleShape2D_4e5h0")
|
||||
|
||||
[node name="VisibleGate" type="ColorRect" parent="Gate"]
|
||||
z_index = -1
|
||||
offset_left = -181.0
|
||||
offset_top = 456.0
|
||||
offset_right = 181.0
|
||||
offset_bottom = 460.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="GateArea" type="Area2D" parent="."]
|
||||
collision_layer = 8
|
||||
monitorable = false
|
||||
|
||||
[node name="GateCollider" type="CollisionShape2D" parent="GateArea"]
|
||||
position = Vector2(0.5, 458)
|
||||
shape = SubResource("RectangleShape2D_4e5h0")
|
||||
|
||||
[node name="DockingArea" type="Area2D" parent="."]
|
||||
collision_layer = 8
|
||||
monitorable = false
|
||||
|
||||
[node name="VisibleArea" type="ColorRect" parent="DockingArea"]
|
||||
z_index = -2
|
||||
offset_left = -171.0
|
||||
offset_top = 248.0
|
||||
offset_right = 177.0
|
||||
offset_bottom = 458.0
|
||||
offset_right = 172.0
|
||||
offset_bottom = 456.0
|
||||
mouse_filter = 2
|
||||
color = Color(1, 1, 1, 0.352941)
|
||||
|
||||
[node name="DockCollider" type="CollisionShape2D" parent="DockingArea"]
|
||||
position = Vector2(0.5, 352)
|
||||
shape = SubResource("RectangleShape2D_uwuva")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue