OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps_demo commits / 2edcb81

stuffage
2edcb816b5f58097aa279dea109ffd3f5e505b7b
by Dresk Spidflisk <dreskspidflisk@gmail.com> · 2022-04-11T19:18:26.000Z

Changed files (4) +28 -61

game/player/player_core.gd +9 -8
……@@ -29,13 +29,14 @@ onready var clippedCameraPivot : Spatial = $CameraHead/CameraPivot
2929onready var meshCollisionShape : CollisionShape = $CollisionShape
3030
3131onready var grappleHookCast : RayCast = $CameraHead/CameraPivot/GrappleHookCast
32#onready var grappleVisualPoint : CSGSphere = $GrapplingHook/GrappleVisualPoint_1
33#onready var grappleVisualPoint : Sprite3D = $GrapplingHook/GrappleVisualPoint_2
34onready var grappleVisualPoint : Spatial = $GrapplingHook/GrappleVisualPoint
35onready var grappleLineHelper : Spatial = $Model/LineHelper
36# onready var grappleVisualLine : CSGCylinder = $GrapplingHook/LineHelper/GrappleVisualLine
37onready var grappleVisualLine : CSGCylinder = $Model/LineHelper/GrappleVisualLine
38#onready var grappleVisualLine : Spatial = $Model/LineHelper/GrappleVisualLine_1
32
33onready var grappleVisualPoint_1 = $GrapplingHook/GrappleVisualPoint_1
34onready var grappleVisualPoint_2 = $GrapplingHook/GrappleVisualPoint_2
35onready var grappleVisualPoint = grappleVisualPoint_1
36
37onready var grappleLineHelper : Spatial = $Model/GrappleLineHelper
38onready var grappleVisualLine : CSGCylinder = $Model/GrappleLineHelper/GrappleVisualLine_1
39# onready var grappleVisualLine : = $Model/GrappleLineHelper/GrappleVisualLine_2
3940
4041var grapplingHook_GrapplePosition : Vector3 = Vector3.ZERO
4142var grapplingHook_IsHooked : bool = false
……@@ -125,7 +126,7 @@ func grapplingHook_CheckActivation():
125126 grapplingHook_IsHooked = true
126127 # grapplingHook_GrapplePosition = grappleHookCast.get_collision_point()
127128 grappleVisualLine.show()
128 $Model/Sound_Shoot_GrapplingHook_1.play()
129 $Model/Sound_Shoot_GrapplingHook_2.play()
129130 elif(playerWantsToReleaseGrapplingHook):
130131 # Stop grappling
131132 grapplingHook_IsHooked = false
game/player/player_core.tscn +12 -11
……@@ -1,4 +1,4 @@
1[gd_scene load_steps=34 format=2]
1[gd_scene load_steps=35 format=2]
22
33[ext_resource path="res://assets/models/tumble/model_tumble.tscn" type="PackedScene" id=1]
44[ext_resource path="res://assets/models/tumble/tumble/sprint-loop.tres" type="Animation" id=2]
……@@ -31,14 +31,13 @@
3131[ext_resource path="res://assets/sounds/player/fire_grapplinghook.wav" type="AudioStream" id=29]
3232[ext_resource path="res://assets/sounds/player/release_grapplinghook.wav" type="AudioStream" id=30]
3333[ext_resource path="res://assets/sounds/player/generic_robot_land.wav" type="AudioStream" id=31]
34[ext_resource path="res://assets/sounds/player/fire_grapplinghook1.mp3" type="AudioStream" id=32]
35[ext_resource path="res://game/player/grappling_hook/gh_visual_line_1.tscn" type="PackedScene" id=34]
3436
3537[sub_resource type="CylinderShape" id=1]
3638radius = 0.3
3739height = 1.58
3840
39[sub_resource type="SpatialMaterial" id=2]
40albedo_color = Color( 0, 0.266667, 0.329412, 1 )
41
4241[node name="PlayerCore" type="KinematicBody"]
4342script = ExtResource( 24 )
4443
……@@ -70,23 +69,24 @@ stream = ExtResource( 27 )
7069transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0, 0 )
7170stream = ExtResource( 26 )
7271
73[node name="Sound_Shoot_GrapplingHook" type="AudioStreamPlayer3D" parent="Model"]
72[node name="Sound_Shoot_GrapplingHook_1" type="AudioStreamPlayer3D" parent="Model"]
7473stream = ExtResource( 29 )
7574attenuation_filter_cutoff_hz = 20500.0
7675
76[node name="Sound_Shoot_GrapplingHook_2" type="AudioStreamPlayer3D" parent="Model"]
77stream = ExtResource( 32 )
78attenuation_filter_cutoff_hz = 20500.0
79
7780[node name="Sound_Release_GrapplingHook" type="AudioStreamPlayer3D" parent="Model"]
7881stream = ExtResource( 30 )
7982attenuation_filter_cutoff_hz = 20500.0
8083
81[node name="LineHelper" type="Spatial" parent="Model"]
84[node name="GrappleLineHelper" type="Spatial" parent="Model"]
8285transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0.753, 0 )
8386
84[node name="GrappleVisualLine" type="CSGCylinder" parent="Model/LineHelper"]
85transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.75273, 0 )
87[node name="GrappleVisualLine_1" parent="Model/GrappleLineHelper" instance=ExtResource( 34 )]
88transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.753, 0 )
8689visible = false
87radius = 0.062
88height = 28.564
89material = SubResource( 2 )
9090
9191[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
9292root_node = NodePath("../Model")
……@@ -115,6 +115,7 @@ anims/wall_run_r-loop = ExtResource( 22 )
115115[node name="AnimationTree" type="AnimationTree" parent="."]
116116tree_root = ExtResource( 5 )
117117anim_player = NodePath("../AnimationPlayer")
118active = true
118119parameters/Blend2/blend_amount = 0
119120"parameters/Blend2 2/blend_amount" = 0
120121"parameters/TimeScale 3/scale" = 1.0
game/player/player_core_local.tscn +6 -41
……@@ -1,41 +1,21 @@
1[gd_scene load_steps=11 format=2]
1[gd_scene load_steps=7 format=2]
22
33[ext_resource path="res://game/player/player_core.tscn" type="PackedScene" id=1]
44[ext_resource path="res://game/player/player_core_local_input.gd" type="Script" id=2]
55[ext_resource path="res://game/player/player_core_local_input_special.gd" type="Script" id=3]
6[ext_resource path="res://assets/sprites/grad_red_dot.png" type="Texture" id=4]
6[ext_resource path="res://game/player/grappling_hook/gh_visual_point_1.tscn" type="PackedScene" id=4]
77[ext_resource path="res://game/player/player_core_local_debugui.tscn" type="PackedScene" id=5]
8[ext_resource path="res://assets/models/tumble/tumble_hand.glb" type="PackedScene" id=6]
9[ext_resource path="res://assets/shaders/electric/electric_grapple.tscn" type="PackedScene" id=7]
10[ext_resource path="res://assets/shaders/electric/Shield.tres" type="Material" id=8]
118[ext_resource path="res://assets/sounds/player/fire_grapplinghook1.mp3" type="AudioStream" id=9]
129
13[sub_resource type="SpatialMaterial" id=1]
14flags_unshaded = true
15flags_no_depth_test = true
16flags_fixed_size = true
17flags_do_not_receive_shadows = true
18flags_disable_ambient_light = true
19albedo_color = Color( 0.407843, 0, 0, 1 )
20
2110[node name="PlayerCoreLocal" instance=ExtResource( 1 )]
2211
2312[node name="Sound_Jump" parent="Model" index="2"]
2413transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
2514
26[node name="Sound_Shoot_GrapplingHook_1" type="AudioStreamPlayer3D" parent="Model" index="7"]
15[node name="Sound_Shoot_GrapplingHook_1" parent="Model" index="7"]
2716transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0, 0 )
2817stream = ExtResource( 9 )
29
30[node name="Sound_Shoot_GrapplingHook" parent="Model" index="8"]
31stream = ExtResource( 9 )
32
33[node name="GrappleVisualLine_1" parent="Model/LineHelper" index="0" instance=ExtResource( 7 )]
34transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.753, 0 )
35visible = false
36
37[node name="GrappleVisualLine" parent="Model/LineHelper" index="1"]
38material = ExtResource( 8 )
18attenuation_filter_cutoff_hz = 5000.0
3919
4020[node name="AnimationTree" parent="." index="3"]
4121active = true
……@@ -57,7 +37,7 @@ enabled = true
5737cast_to = Vector3( 0, 0, -400 )
5838collision_mask = 2
5939debug_shape_custom_color = Color( 1, 0, 0, 1 )
60debug_shape_thickness = 5.0
40debug_shape_thickness = 5
6141
6242[node name="ClippedCamera" type="ClippedCamera" parent="CameraHead/CameraPivot" index="1"]
6343transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5 )
……@@ -65,22 +45,7 @@ fov = 90.0
6545
6646[node name="PlayerDebugUI" parent="." index="7" instance=ExtResource( 5 )]
6747
68[node name="GrappleVisualPoint" parent="GrapplingHook" index="0" instance=ExtResource( 6 )]
69transform = Transform( 3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0 )
70
71[node name="GrappleVisualPoint_1" type="CSGSphere" parent="GrapplingHook" index="1"]
72visible = false
73cast_shadow = 0
74radius = 0.025
75radial_segments = 22
76rings = 22
77material = SubResource( 1 )
78
79[node name="GrappleVisualPoint_2" type="Sprite3D" parent="GrapplingHook" index="2"]
80visible = false
81cast_shadow = 0
82billboard = 1
83texture = ExtResource( 4 )
48[node name="GrappleVisualPoint_1" parent="GrapplingHook" index="0" instance=ExtResource( 4 )]
8449
8550[connection signal="player_jump" from="Input" to="." method="_on_Input_player_jump"]
8651[connection signal="player_mousemotion_event" from="Input" to="." method="_on_Input_player_mousemotion_event"]
game/player/player_local_core.tres +1 -1
……@@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 )
187187nodes/walk_scale/position = Vector2( -640, 360 )
188188nodes/wall_run/node = SubResource( 50 )
189189nodes/wall_run/position = Vector2( 720, -60 )
190node_connections = [ "output", 0, "wall_run", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "TimeScale 3", 0, "strafe", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "falling_scale", 0, "Animation 6", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "jump_scale", 0, "jump", "landing_scale", 0, "Animation 7", "roll", 0, "air_transition", "roll", 1, "roll_scale", "roll_scale", 0, "Animation", "run_scale", 0, "Animation 4", "walk_scale", 0, "Animation 3", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll" ]
190node_connections = [ "output", 0, "wall_run", "run_scale", 0, "Animation 4", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "roll_scale", 0, "Animation", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "jump_scale", 0, "jump", "landing_scale", 0, "Animation 7", "walk_scale", 0, "Animation 3", "falling_scale", 0, "Animation 6", "roll", 0, "air_transition", "roll", 1, "roll_scale", "TimeScale 3", 0, "strafe", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale" ]