Add ship movement and shooting mechanics; update flying ship scene with new components
This commit is contained in:
74
objects/entities/green_laser.tscn
Normal file
74
objects/entities/green_laser.tscn
Normal file
@@ -0,0 +1,74 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dtem8jgcyoqar"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="1_nuljg"]
|
||||
[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_1gu8o"]
|
||||
[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="3_2vcrp"]
|
||||
[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="4_2bmqm"]
|
||||
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="5_772bd"]
|
||||
[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="6_vd16u"]
|
||||
[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="7_1gu8o"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_n4uav"]
|
||||
size = Vector2(16, 2)
|
||||
|
||||
[node name="Red Laser" type="Area2D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 9
|
||||
|
||||
[node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")]
|
||||
script = ExtResource("1_nuljg")
|
||||
area2d = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://dkmxhjtmu5xlb"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(8, -0.5)
|
||||
shape = SubResource("RectangleShape2D_n4uav")
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="."]
|
||||
points = PackedVector2Array(0, 0, 16, 0)
|
||||
width = 2.0
|
||||
default_color = Color(0, 94.012, 1, 1)
|
||||
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
|
||||
script = ExtResource("2_1gu8o")
|
||||
root = NodePath("..")
|
||||
area2d = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://cdnwrn8v05qhi"
|
||||
|
||||
[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")]
|
||||
script = ExtResource("3_2vcrp")
|
||||
visibility_notifier = NodePath("../VisibleOnScreenNotifier2D")
|
||||
root = NodePath("..")
|
||||
metadata/_custom_type_script = "uid://1tnr46o1ib4u"
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(8, 0)
|
||||
scale = Vector2(0.8, 0.1)
|
||||
|
||||
[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")]
|
||||
script = ExtResource("4_2bmqm")
|
||||
root = NodePath("..")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://cvcnfrr1udco5"
|
||||
|
||||
[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")]
|
||||
script = ExtResource("5_772bd")
|
||||
root = NodePath("..")
|
||||
speed = 320.0
|
||||
metadata/_custom_type_script = "uid://873un8agkyja"
|
||||
|
||||
[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")]
|
||||
script = ExtResource("6_vd16u")
|
||||
root = NodePath("..")
|
||||
life_time = 10.0
|
||||
timer = NodePath("../Timer")
|
||||
metadata/_custom_type_script = "uid://bvsgg8lu0a8m6"
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 5.0
|
||||
autostart = true
|
||||
|
||||
[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")]
|
||||
script = ExtResource("7_1gu8o")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://bgty7040ams6s"
|
Reference in New Issue
Block a user