mirror of
https://github.com/godotengine/tps-demo.git
synced 2026-01-04 22:10:23 +03:00
- added blast effect for laser hit - reworked laser shader and shape - reworked charging effect - changed effect for death - added disappear effect for parts
399 lines
13 KiB
Plaintext
399 lines
13 KiB
Plaintext
[gd_scene load_steps=47 format=2]
|
|
|
|
[ext_resource path="res://player/player.gd" type="Script" id=1]
|
|
[ext_resource path="res://player/model/player.glb" type="PackedScene" id=2]
|
|
[ext_resource path="res://player/crosshair.png" type="Texture" id=3]
|
|
[ext_resource path="res://player/audio/step_random_pitch.tres" type="AudioStream" id=4]
|
|
[ext_resource path="res://player/audio/jump.wav" type="AudioStream" id=5]
|
|
[ext_resource path="res://player/audio/land.wav" type="AudioStream" id=6]
|
|
[ext_resource path="res://player/audio/shoot.wav" type="AudioStream" id=7]
|
|
[ext_resource path="res://player/camera_noise_shake_effect.gd" type="Script" id=8]
|
|
[ext_resource path="res://player/bullet/bullet_material.tres" type="Material" id=9]
|
|
[ext_resource path="res://player/model/MuzzleFlashParticle.tres" type="ArrayMesh" id=10]
|
|
[ext_resource path="res://player/bullet/effect/FlarePolar.png" type="Texture" id=11]
|
|
|
|
[sub_resource type="ParticlesMaterial" id=1]
|
|
flag_align_y = true
|
|
direction = Vector3( 0, 0, -1 )
|
|
spread = 15.0
|
|
gravity = Vector3( 0, -3, 0 )
|
|
initial_velocity = 3.0
|
|
|
|
[sub_resource type="SphereMesh" id=2]
|
|
radius = 0.003
|
|
height = 0.02
|
|
|
|
[sub_resource type="SpatialMaterial" id=3]
|
|
flags_transparent = true
|
|
flags_unshaded = true
|
|
vertex_color_use_as_albedo = true
|
|
params_cull_mode = 2
|
|
albedo_texture = ExtResource( 11 )
|
|
|
|
[sub_resource type="Gradient" id=4]
|
|
offsets = PoolRealArray( 0.325926, 1 )
|
|
colors = PoolColorArray( 0.0507812, 0.955505, 1, 1, 0.875, 0.888672, 1, 0.305882 )
|
|
|
|
[sub_resource type="GradientTexture" id=5]
|
|
gradient = SubResource( 4 )
|
|
width = 32
|
|
|
|
[sub_resource type="Curve" id=6]
|
|
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.791139, 0.990909 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ]
|
|
|
|
[sub_resource type="CurveTexture" id=7]
|
|
width = 64
|
|
curve = SubResource( 6 )
|
|
|
|
[sub_resource type="ParticlesMaterial" id=8]
|
|
gravity = Vector3( 0, 0, 0 )
|
|
angle = -4.0
|
|
angle_random = 1.0
|
|
scale = 0.3
|
|
scale_curve = SubResource( 7 )
|
|
color_ramp = SubResource( 5 )
|
|
|
|
[sub_resource type="AnimationNodeAdd3" id=9]
|
|
resource_local_to_scene = true
|
|
filter_enabled = true
|
|
filters = [ "Robot_Skeleton/Skeleton:neck.001", "Robot_Skeleton/Skeleton:upper_arm.R" ]
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=10]
|
|
resource_local_to_scene = true
|
|
animation = "AIM-Down"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=11]
|
|
resource_local_to_scene = true
|
|
animation = "AIM-Up"
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id=12]
|
|
resource_local_to_scene = true
|
|
filter_enabled = true
|
|
filters = [ "Robot_Skeleton/Skeleton:eyelid.d.L", "Robot_Skeleton/Skeleton:eyelid.d.R", "Robot_Skeleton/Skeleton:eyelid.u.L", "Robot_Skeleton/Skeleton:eyelid.u.R", "Robot_Skeleton/Skeleton:eyes" ]
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=13]
|
|
resource_local_to_scene = true
|
|
animation = "eyes-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=14]
|
|
resource_local_to_scene = true
|
|
animation = "jump_5_hardlanding"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=15]
|
|
resource_local_to_scene = true
|
|
animation = "jump_4_falling-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=16]
|
|
resource_local_to_scene = true
|
|
animation = "jump_2_upwards-cycle"
|
|
|
|
[sub_resource type="AnimationNodeOneShot" id=17]
|
|
resource_local_to_scene = true
|
|
fadein_time = 0.25
|
|
fadeout_time = 0.25
|
|
autorestart_random_delay = 1.0
|
|
|
|
[sub_resource type="AnimationNodeTransition" id=18]
|
|
resource_local_to_scene = true
|
|
input_count = 4
|
|
xfade_time = 0.15
|
|
input_0/name = "strafe"
|
|
input_0/auto_advance = false
|
|
input_1/name = "walk"
|
|
input_1/auto_advance = false
|
|
input_2/name = "jump_up"
|
|
input_2/auto_advance = false
|
|
input_3/name = "jump_down"
|
|
input_3/auto_advance = false
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=19]
|
|
resource_local_to_scene = true
|
|
animation = "strafe_left-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=20]
|
|
resource_local_to_scene = true
|
|
animation = "strafe_right-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=21]
|
|
resource_local_to_scene = true
|
|
animation = "strafe_back-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=22]
|
|
resource_local_to_scene = true
|
|
animation = "strafe_front-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=23]
|
|
resource_local_to_scene = true
|
|
animation = "Idlecombat-cycle"
|
|
|
|
[sub_resource type="AnimationNodeBlendSpace2D" id=24]
|
|
resource_local_to_scene = true
|
|
blend_point_0/node = SubResource( 19 )
|
|
blend_point_0/pos = Vector2( 1, 0 )
|
|
blend_point_1/node = SubResource( 20 )
|
|
blend_point_1/pos = Vector2( -1, 0 )
|
|
blend_point_2/node = SubResource( 21 )
|
|
blend_point_2/pos = Vector2( 0, -1 )
|
|
blend_point_3/node = SubResource( 22 )
|
|
blend_point_3/pos = Vector2( 0, 1 )
|
|
blend_point_4/node = SubResource( 23 )
|
|
blend_point_4/pos = Vector2( 0, 0 )
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=25]
|
|
resource_local_to_scene = true
|
|
animation = "Idle-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=26]
|
|
resource_local_to_scene = true
|
|
animation = "running_nogun-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=27]
|
|
resource_local_to_scene = true
|
|
animation = "running_gun-cycle"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id=28]
|
|
resource_local_to_scene = true
|
|
animation = "Idlecombat-cycle"
|
|
|
|
[sub_resource type="AnimationNodeBlendSpace2D" id=29]
|
|
resource_local_to_scene = true
|
|
blend_point_0/node = SubResource( 25 )
|
|
blend_point_0/pos = Vector2( 0, 0 )
|
|
blend_point_1/node = SubResource( 26 )
|
|
blend_point_1/pos = Vector2( 1, 0 )
|
|
blend_point_2/node = SubResource( 27 )
|
|
blend_point_2/pos = Vector2( 1, 1 )
|
|
blend_point_3/node = SubResource( 28 )
|
|
blend_point_3/pos = Vector2( 0, 1 )
|
|
min_space = Vector2( 0, 0 )
|
|
x_label = "speed"
|
|
y_label = "gun"
|
|
|
|
[sub_resource type="AnimationNodeBlendTree" id=30]
|
|
resource_local_to_scene = true
|
|
graph_offset = Vector2( 1, 85 )
|
|
nodes/aim/node = SubResource( 9 )
|
|
nodes/aim/position = Vector2( 380, 120 )
|
|
nodes/aimdown/node = SubResource( 10 )
|
|
nodes/aimdown/position = Vector2( 120, 60 )
|
|
nodes/aimup/node = SubResource( 11 )
|
|
nodes/aimup/position = Vector2( 140, 380 )
|
|
nodes/eye_blend/node = SubResource( 12 )
|
|
nodes/eye_blend/position = Vector2( 640, 120 )
|
|
nodes/eyes/node = SubResource( 13 )
|
|
nodes/eyes/position = Vector2( 380, 360 )
|
|
nodes/hardland/node = SubResource( 14 )
|
|
nodes/hardland/position = Vector2( -160, 340 )
|
|
nodes/jumpdown/node = SubResource( 15 )
|
|
nodes/jumpdown/position = Vector2( -460, 320 )
|
|
nodes/jumpup/node = SubResource( 16 )
|
|
nodes/jumpup/position = Vector2( -480, 200 )
|
|
nodes/land/node = SubResource( 17 )
|
|
nodes/land/position = Vector2( 120, 180 )
|
|
nodes/output/position = Vector2( 840, 120 )
|
|
nodes/state/node = SubResource( 18 )
|
|
nodes/state/position = Vector2( -120, 120 )
|
|
nodes/strafe/node = SubResource( 24 )
|
|
nodes/strafe/position = Vector2( -400, -120 )
|
|
nodes/walk/node = SubResource( 29 )
|
|
nodes/walk/position = Vector2( -400, 40 )
|
|
node_connections = [ "output", 0, "eye_blend", "state", 0, "strafe", "state", 1, "walk", "state", 2, "jumpup", "state", 3, "jumpdown", "aim", 0, "aimdown", "aim", 1, "land", "aim", 2, "aimup", "eye_blend", 0, "aim", "eye_blend", 1, "eyes", "land", 0, "state", "land", 1, "hardland" ]
|
|
|
|
[sub_resource type="CapsuleShape" id=31]
|
|
radius = 0.5
|
|
height = 0.6
|
|
|
|
[sub_resource type="RayShape" id=32]
|
|
|
|
[sub_resource type="Animation" id=33]
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("CameraRot/SpringArm:translation")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0, 1 ),
|
|
"transitions": PoolRealArray( 0.287175, 1 ),
|
|
"update": 3,
|
|
"values": [ Vector3( 0, 0, 0 ), Vector3( 0, 0, 0 ) ]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/path = NodePath("../Crosshair:self_modulate")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/keys = {
|
|
"times": PoolRealArray( 0.3 ),
|
|
"transitions": PoolRealArray( 1 ),
|
|
"update": 3,
|
|
"values": [ Color( 1, 1, 1, 0 ) ]
|
|
}
|
|
|
|
[sub_resource type="Animation" id=34]
|
|
tracks/0/type = "value"
|
|
tracks/0/path = NodePath("CameraRot/SpringArm:translation")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/keys = {
|
|
"times": PoolRealArray( 0, 1 ),
|
|
"transitions": PoolRealArray( 0.233259, 1 ),
|
|
"update": 3,
|
|
"values": [ Vector3( -0.6, -0.3, 1.1 ), Vector3( -0.6, -0.3, 1.1 ) ]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/path = NodePath("../Crosshair:self_modulate")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/keys = {
|
|
"times": PoolRealArray( 0.3 ),
|
|
"transitions": PoolRealArray( 1 ),
|
|
"update": 3,
|
|
"values": [ Color( 1, 1, 1, 1 ) ]
|
|
}
|
|
|
|
[sub_resource type="AudioStreamRandomPitch" id=35]
|
|
audio_stream = ExtResource( 7 )
|
|
|
|
[node name="Player" type="KinematicBody"]
|
|
collision_layer = 6
|
|
collision_mask = 7
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="PlayerModel" parent="." instance=ExtResource( 2 )]
|
|
|
|
[node name="Robot_Skeleton" parent="PlayerModel" index="0"]
|
|
transform = Transform( 0.803991, 0, 0, 0, 0.803991, 0, 0, 0, 0.803991, 0, 0, 0 )
|
|
|
|
[node name="GunBone" type="BoneAttachment" parent="PlayerModel/Robot_Skeleton/Skeleton" index="5"]
|
|
transform = Transform( 0.897421, -0.247601, 0.365395, -0.262988, -0.964798, -0.00816901, 0.354591, -0.0887302, -0.930816, -0.207098, 1.36135, 0.549705 )
|
|
bone_name = "hand.R"
|
|
|
|
[node name="ShootFrom" type="Position3D" parent="PlayerModel/Robot_Skeleton/Skeleton/GunBone"]
|
|
transform = Transform( 0.999919, 0.0106283, -0.00705317, -0.0105956, 0.99993, 0.00505793, 0.00710796, -0.0049828, 0.999962, 0.0100024, -0.00491095, -0.40371 )
|
|
|
|
[node name="ShootParticle" type="Particles" parent="PlayerModel/Robot_Skeleton/Skeleton/GunBone/ShootFrom"]
|
|
transform = Transform( 1, 2.04891e-08, 0, 3.21306e-08, 1, 5.58794e-09, 0, 0, 1, 0, 0, 0 )
|
|
material_override = ExtResource( 9 )
|
|
emitting = false
|
|
amount = 10
|
|
lifetime = 0.3
|
|
one_shot = true
|
|
explosiveness = 0.79
|
|
local_coords = false
|
|
process_material = SubResource( 1 )
|
|
draw_pass_1 = SubResource( 2 )
|
|
|
|
[node name="MuzzleFlash" type="Particles" parent="PlayerModel/Robot_Skeleton/Skeleton/GunBone/ShootFrom"]
|
|
transform = Transform( 1, 0, -2.00234e-08, 1.21072e-08, -4.37722e-08, -1, -2.98023e-08, 1, -4.74975e-08, 0, 0, 0 )
|
|
material_override = SubResource( 3 )
|
|
emitting = false
|
|
amount = 1
|
|
lifetime = 0.1
|
|
one_shot = true
|
|
explosiveness = 1.0
|
|
process_material = SubResource( 8 )
|
|
draw_pass_1 = ExtResource( 10 )
|
|
|
|
[node name="RootMotionView" type="RootMotionView" parent="."]
|
|
animation_path = NodePath("../AnimationTree")
|
|
|
|
[node name="AnimationTree" type="AnimationTree" parent="."]
|
|
tree_root = SubResource( 30 )
|
|
anim_player = NodePath("../PlayerModel/AnimationPlayer")
|
|
active = true
|
|
process_mode = 0
|
|
root_motion_track = NodePath("Robot_Skeleton/Skeleton:root")
|
|
parameters/aim/add_amount = 0
|
|
parameters/eye_blend/blend_amount = 1.0
|
|
parameters/land/active = false
|
|
parameters/state/current = 0
|
|
parameters/strafe/blend_position = Vector2( 0, 0 )
|
|
parameters/walk/blend_position = Vector2( 0, 0 )
|
|
|
|
[node name="CapsuleShape" type="CollisionShape" parent="."]
|
|
transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 1, 0 )
|
|
shape = SubResource( 31 )
|
|
|
|
[node name="RayShape" type="CollisionShape" parent="."]
|
|
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 1.00357, 0 )
|
|
shape = SubResource( 32 )
|
|
|
|
[node name="CameraBase" type="Spatial" parent="."]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0 )
|
|
__meta__ = {
|
|
"_editor_description_": "Handles Y rotation (yaw)."
|
|
}
|
|
|
|
[node name="CameraRot" type="Spatial" parent="CameraBase"]
|
|
__meta__ = {
|
|
"_editor_description_": "Handles X rotation (pitch)."
|
|
}
|
|
|
|
[node name="SpringArm" type="SpringArm" parent="CameraBase/CameraRot"]
|
|
transform = Transform( -1, -1.11444e-07, 3.06191e-07, 0, 0.939693, 0.34202, -3.25841e-07, 0.34202, -0.939693, 0, 0, 0 )
|
|
spring_length = 2.4
|
|
|
|
[node name="Camera" type="Camera" parent="CameraBase/CameraRot/SpringArm"]
|
|
transform = Transform( 1, 1.42109e-14, -2.84217e-14, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
|
current = true
|
|
far = 300.0
|
|
script = ExtResource( 8 )
|
|
__meta__ = {
|
|
"_editor_description_": "Translated when aiming."
|
|
}
|
|
|
|
[node name="Animation" type="AnimationPlayer" parent="CameraBase"]
|
|
anims/far = SubResource( 33 )
|
|
anims/shoot = SubResource( 34 )
|
|
|
|
[node name="ColorRect" type="ColorRect" parent="."]
|
|
modulate = Color( 1, 1, 1, 0 )
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
color = Color( 0, 0, 0, 1 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="Crosshair" type="TextureRect" parent="."]
|
|
self_modulate = Color( 1, 1, 1, 0 )
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -17.3346
|
|
margin_top = -23.8394
|
|
margin_right = 14.6654
|
|
margin_bottom = 8.16064
|
|
texture = ExtResource( 3 )
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="SoundEffects" type="Node" parent="."]
|
|
|
|
[node name="Step" type="AudioStreamPlayer" parent="SoundEffects"]
|
|
stream = ExtResource( 4 )
|
|
|
|
[node name="Jump" type="AudioStreamPlayer" parent="SoundEffects"]
|
|
stream = ExtResource( 5 )
|
|
|
|
[node name="Land" type="AudioStreamPlayer" parent="SoundEffects"]
|
|
stream = ExtResource( 6 )
|
|
|
|
[node name="Shoot" type="AudioStreamPlayer" parent="SoundEffects"]
|
|
stream = SubResource( 35 )
|
|
|
|
[node name="FireCooldown" type="Timer" parent="."]
|
|
wait_time = 0.4
|
|
one_shot = true
|
|
autostart = true
|
|
|
|
[editable path="PlayerModel"]
|