spacegame/player/player.tscn
2025-03-22 13:32:53 +01:00

164 lines
5.4 KiB
Text

[gd_scene load_steps=18 format=3 uid="uid://b3xadpl4pu33u"]
[ext_resource type="Script" uid="uid://erjhplyctxik" path="res://player/player.gd" id="1_kkw55"]
[ext_resource type="Texture2D" uid="uid://dlenptyfk1iwn" path="res://player/ship.png" id="2_1h4u8"]
[ext_resource type="PackedScene" uid="uid://dnndsvtgqr8eq" path="res://bullet/bullet.tscn" id="2_yw30f"]
[ext_resource type="PackedScene" uid="uid://y08tu4ftj3t4" path="res://player/thruster.tscn" id="3_r6c8y"]
[ext_resource type="Script" uid="uid://dccya6vnwi1x4" path="res://player/railgun.gd" id="5_g6k8r"]
[ext_resource type="PackedScene" uid="uid://800ou0i3omcs" path="res://effects/flash.tscn" id="5_qjkh3"]
[ext_resource type="PackedScene" uid="uid://dfm1atk5lpdo4" path="res://hud/radar/radar.tscn" id="7_rgyib"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_6481p"]
friction = 0.0
[sub_resource type="Curve" id="Curve_f6djc"]
_data = [Vector2(0.2, 0), 0.0, 0.0, 0, 0, Vector2(0.5, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.505618), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="Curve" id="Curve_f2yms"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.217391, 1), 0.0, 0.0, 0, 0, Vector2(0.804348, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="CurveTexture" id="CurveTexture_q5aon"]
curve = SubResource("Curve_f2yms")
[sub_resource type="Curve" id="Curve_kdc30"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.195652, 1), 0.0, 0.0, 0, 0, Vector2(0.820158, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="CurveTexture" id="CurveTexture_w2mcu"]
curve = SubResource("Curve_kdc30")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_k0vl1"]
particle_flag_disable_z = true
emission_shape = 3
emission_box_extents = Vector3(200, 200, 1)
angle_min = -720.0
angle_max = 720.0
spread = 180.0
initial_velocity_max = 1.0
angular_velocity_min = -10.0
angular_velocity_max = 9.99998
gravity = Vector3(0, 0, 0)
scale_max = 2.0
scale_curve = SubResource("CurveTexture_w2mcu")
alpha_curve = SubResource("CurveTexture_q5aon")
[sub_resource type="Animation" id="Animation_qjkh3"]
resource_name = "shoot"
length = 0.4
step = 0.1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("%railgun/../image:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.1, 0.003124, 0.835, -0.066667, -0.000579298, 0.133333, -0.000579298, 1, -0.2, 0.00127017, 0.25, 0),
"times": PackedFloat32Array(0, 0.166667, 0.4)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("%railgun/../image:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.1, -0.000583708, 1.177, -0.066667, -0.00146496, 0.133333, -0.00517273, 1, -0.2, 0.003124, 0.25, 0),
"times": PackedFloat32Array(0, 0.166667, 0.4)
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"do_shoot"
}]
}
[sub_resource type="Animation" id="Animation_g6k8r"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("%railgun/../image:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("%railgun/../image:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_g6k8r"]
_data = {
&"RESET": SubResource("Animation_g6k8r"),
&"shoot": SubResource("Animation_qjkh3")
}
[node name="player" type="RigidBody2D"]
physics_material_override = SubResource("PhysicsMaterial_6481p")
gravity_scale = 0.0
can_sleep = false
angular_damp = 2.0
script = ExtResource("1_kkw55")
thruster_strength = null
rotation_strength = null
drift_curve = SubResource("Curve_f6djc")
[node name="camera" type="Camera2D" parent="."]
zoom = Vector2(4, 4)
position_smoothing_enabled = true
[node name="stars" type="GPUParticles2D" parent="camera"]
amount = 100
lifetime = 30.0
process_material = SubResource("ParticleProcessMaterial_k0vl1")
[node name="collision" type="CollisionPolygon2D" parent="."]
polygon = PackedVector2Array(-5, 7, 0, -7, 5, 7, 2, 8, -2, 8)
[node name="image" type="Sprite2D" parent="."]
texture = ExtResource("2_1h4u8")
[node name="thruster" parent="." instance=ExtResource("3_r6c8y")]
unique_name_in_owner = true
position = Vector2(0, 8)
[node name="railgun" type="Marker2D" parent="."]
unique_name_in_owner = true
position = Vector2(0, -10)
gizmo_extents = 3.0
script = ExtResource("5_g6k8r")
bullet = ExtResource("2_yw30f")
[node name="flash" parent="railgun" instance=ExtResource("5_qjkh3")]
unique_name_in_owner = true
oneshot = false
[node name="animations" type="AnimationPlayer" parent="railgun"]
libraries = {
&"": SubResource("AnimationLibrary_g6k8r")
}
[node name="radar" parent="." instance=ExtResource("7_rgyib")]