forked from devloglogan/MultiplayerFPSTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.tscn
178 lines (154 loc) · 5.68 KB
/
player.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[gd_scene load_steps=17 format=3 uid="uid://xcjrjq5cbn7y"]
[ext_resource type="Script" path="res://player.gd" id="1_2v3wm"]
[ext_resource type="PackedScene" uid="uid://cf1dcxwv6bvl3" path="res://models/Pistol.glb" id="2_4esil"]
[ext_resource type="Texture2D" uid="uid://vwob30tkwej4" path="res://addons/kenney_particle_pack/star_06.png" id="3_27dhu"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_xk8km"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_67y6s"]
[sub_resource type="Gradient" id="Gradient_cfnn0"]
offsets = PackedFloat32Array(0, 0.141221, 1)
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_is51c"]
gradient = SubResource("Gradient_cfnn0")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_uu53b"]
gravity = Vector3(0, 0, 0)
angle_min = 45.0
angle_max = 45.0
color_ramp = SubResource("GradientTexture1D_is51c")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4smqo"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
albedo_color = Color(1, 0.960784, 0.670588, 1)
albedo_texture = ExtResource("3_27dhu")
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="PlaneMesh" id="PlaneMesh_b2g4i"]
material = SubResource("StandardMaterial3D_4smqo")
size = Vector2(0.5, 0.5)
orientation = 2
[sub_resource type="Animation" id="Animation_jhgv2"]
length = 0.001
[sub_resource type="Animation" id="Animation_knepc"]
resource_name = "idle"
length = 3.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.5),
"transitions": PackedFloat32Array(-2, -2),
"update": 0,
"values": [Vector3(0.5, -0.25, -0.5), Vector3(0.5, -0.284894, -0.5)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D/Pistol:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1.5),
"transitions": PackedFloat32Array(-2, -2),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(-0.122103, 0, 0)]
}
[sub_resource type="Animation" id="Animation_qcgne"]
resource_name = "move"
loop_mode = 1
step = 0.25
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75),
"transitions": PackedFloat32Array(0.5, 2, 0.5, 2),
"update": 0,
"values": [Vector3(0.5, -0.25, -0.5), Vector3(0.455732, -0.215424, -0.5), Vector3(0.5, -0.25, -0.5), Vector3(0.55565, -0.198737, -0.5)]
}
[sub_resource type="Animation" id="Animation_efeb8"]
resource_name = "shoot"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Camera3D/Pistol:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.4),
"transitions": PackedFloat32Array(0.5, 1),
"update": 0,
"values": [Vector3(0.5, -0.185618, -0.5), Vector3(0.5, -0.25, -0.5)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Camera3D/Pistol:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.4),
"transitions": PackedFloat32Array(0.5, 1),
"update": 0,
"values": [Vector3(0.454152, 0, 0), Vector3(0, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_p6wdk"]
_data = {
"RESET": SubResource("Animation_jhgv2"),
"idle": SubResource("Animation_knepc"),
"move": SubResource("Animation_qcgne"),
"shoot": SubResource("Animation_efeb8")
}
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_hn37q"]
properties/0/path = NodePath(".:position")
properties/0/spawn = true
properties/0/sync = true
properties/1/path = NodePath(".:rotation")
properties/1/spawn = true
properties/1/sync = true
properties/2/path = NodePath("Camera3D:rotation")
properties/2/spawn = true
properties/2/sync = true
[node name="Player" type="CharacterBody3D"]
collision_layer = 2
script = ExtResource("1_2v3wm")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("CapsuleMesh_xk8km")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_67y6s")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51306, 0)
[node name="Pistol" parent="Camera3D" instance=ExtResource("2_4esil")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, -0.25, -0.5)
[node name="MuzzleFlash" type="GPUParticles3D" parent="Camera3D/Pistol"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0588368, -0.313209)
emitting = false
amount = 1
lifetime = 0.25
one_shot = true
local_coords = true
process_material = SubResource("ParticleProcessMaterial_uu53b")
draw_pass_1 = SubResource("PlaneMesh_b2g4i")
[node name="RayCast3D" type="RayCast3D" parent="Camera3D"]
target_position = Vector3(0, 0, -50)
collision_mask = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "idle"
playback_default_blend_time = 0.05
libraries = {
"": SubResource("AnimationLibrary_p6wdk")
}
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_config = SubResource("SceneReplicationConfig_hn37q")
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"]