| … | … | @@ -29,13 +29,14 @@ onready var clippedCameraPivot : Spatial = $CameraHead/CameraPivot |
| 29 | 29 | onready var meshCollisionShape : CollisionShape = $CollisionShape |
| 30 | 30 | |
| 31 | 31 | onready var grappleHookCast : RayCast = $CameraHead/CameraPivot/GrappleHookCast |
| 32 | #onready var grappleVisualPoint : CSGSphere = $GrapplingHook/GrappleVisualPoint_1 | |
| 33 | #onready var grappleVisualPoint : Sprite3D = $GrapplingHook/GrappleVisualPoint_2 | |
| 34 | onready var grappleVisualPoint : Spatial = $GrapplingHook/GrappleVisualPoint | |
| 35 | onready var grappleLineHelper : Spatial = $Model/LineHelper | |
| 36 | # onready var grappleVisualLine : CSGCylinder = $GrapplingHook/LineHelper/GrappleVisualLine | |
| 37 | onready var grappleVisualLine : CSGCylinder = $Model/LineHelper/GrappleVisualLine | |
| 38 | #onready var grappleVisualLine : Spatial = $Model/LineHelper/GrappleVisualLine_1 | |
| 32 | ||
| 33 | onready var grappleVisualPoint_1 = $GrapplingHook/GrappleVisualPoint_1 | |
| 34 | onready var grappleVisualPoint_2 = $GrapplingHook/GrappleVisualPoint_2 | |
| 35 | onready var grappleVisualPoint = grappleVisualPoint_1 | |
| 36 | ||
| 37 | onready var grappleLineHelper : Spatial = $Model/GrappleLineHelper | |
| 38 | onready var grappleVisualLine : CSGCylinder = $Model/GrappleLineHelper/GrappleVisualLine_1 | |
| 39 | # onready var grappleVisualLine : = $Model/GrappleLineHelper/GrappleVisualLine_2 | |
| 39 | 40 | |
| 40 | 41 | var grapplingHook_GrapplePosition : Vector3 = Vector3.ZERO |
| 41 | 42 | var grapplingHook_IsHooked : bool = false |
| … | … | @@ -125,7 +126,7 @@ func grapplingHook_CheckActivation(): |
| 125 | 126 | grapplingHook_IsHooked = true |
| 126 | 127 | # grapplingHook_GrapplePosition = grappleHookCast.get_collision_point() |
| 127 | 128 | grappleVisualLine.show() |
| 128 | $Model/Sound_Shoot_GrapplingHook_1.play() | |
| 129 | $Model/Sound_Shoot_GrapplingHook_2.play() | |
| 129 | 130 | elif(playerWantsToReleaseGrapplingHook): |
| 130 | 131 | # Stop grappling |
| 131 | 132 | grapplingHook_IsHooked = false |
| … | … | @@ -1,4 +1,4 @@ |
| 1 | [gd_scene load_steps=34 format=2] | |
| 1 | [gd_scene load_steps=35 format=2] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource path="res://assets/models/tumble/model_tumble.tscn" type="PackedScene" id=1] |
| 4 | 4 | [ext_resource path="res://assets/models/tumble/tumble/sprint-loop.tres" type="Animation" id=2] |
| … | … | @@ -31,14 +31,13 @@ |
| 31 | 31 | [ext_resource path="res://assets/sounds/player/fire_grapplinghook.wav" type="AudioStream" id=29] |
| 32 | 32 | [ext_resource path="res://assets/sounds/player/release_grapplinghook.wav" type="AudioStream" id=30] |
| 33 | 33 | [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] | |
| 34 | 36 | |
| 35 | 37 | [sub_resource type="CylinderShape" id=1] |
| 36 | 38 | radius = 0.3 |
| 37 | 39 | height = 1.58 |
| 38 | 40 | |
| 39 | [sub_resource type="SpatialMaterial" id=2] | |
| 40 | albedo_color = Color( 0, 0.266667, 0.329412, 1 ) | |
| 41 | ||
| 42 | 41 | [node name="PlayerCore" type="KinematicBody"] |
| 43 | 42 | script = ExtResource( 24 ) |
| 44 | 43 | |
| … | … | @@ -70,23 +69,24 @@ stream = ExtResource( 27 ) |
| 70 | 69 | transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0, 0 ) |
| 71 | 70 | stream = ExtResource( 26 ) |
| 72 | 71 | |
| 73 | [node name="Sound_Shoot_GrapplingHook" type="AudioStreamPlayer3D" parent="Model"] | |
| 72 | [node name="Sound_Shoot_GrapplingHook_1" type="AudioStreamPlayer3D" parent="Model"] | |
| 74 | 73 | stream = ExtResource( 29 ) |
| 75 | 74 | attenuation_filter_cutoff_hz = 20500.0 |
| 76 | 75 | |
| 76 | [node name="Sound_Shoot_GrapplingHook_2" type="AudioStreamPlayer3D" parent="Model"] | |
| 77 | stream = ExtResource( 32 ) | |
| 78 | attenuation_filter_cutoff_hz = 20500.0 | |
| 79 | ||
| 77 | 80 | [node name="Sound_Release_GrapplingHook" type="AudioStreamPlayer3D" parent="Model"] |
| 78 | 81 | stream = ExtResource( 30 ) |
| 79 | 82 | attenuation_filter_cutoff_hz = 20500.0 |
| 80 | 83 | |
| 81 | [node name="LineHelper" type="Spatial" parent="Model"] | |
| 84 | [node name="GrappleLineHelper" type="Spatial" parent="Model"] | |
| 82 | 85 | transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0.753, 0 ) |
| 83 | 86 | |
| 84 | [node name="GrappleVisualLine" type="CSGCylinder" parent="Model/LineHelper"] | |
| 85 | transform = 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 )] | |
| 88 | transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0.753, 0 ) | |
| 86 | 89 | visible = false |
| 87 | radius = 0.062 | |
| 88 | height = 28.564 | |
| 89 | material = SubResource( 2 ) | |
| 90 | 90 | |
| 91 | 91 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] |
| 92 | 92 | root_node = NodePath("../Model") |
| … | … | @@ -115,6 +115,7 @@ anims/wall_run_r-loop = ExtResource( 22 ) |
| 115 | 115 | [node name="AnimationTree" type="AnimationTree" parent="."] |
| 116 | 116 | tree_root = ExtResource( 5 ) |
| 117 | 117 | anim_player = NodePath("../AnimationPlayer") |
| 118 | active = true | |
| 118 | 119 | parameters/Blend2/blend_amount = 0 |
| 119 | 120 | "parameters/Blend2 2/blend_amount" = 0 |
| 120 | 121 | "parameters/TimeScale 3/scale" = 1.0 |
| … | … | @@ -1,41 +1,21 @@ |
| 1 | [gd_scene load_steps=11 format=2] | |
| 1 | [gd_scene load_steps=7 format=2] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource path="res://game/player/player_core.tscn" type="PackedScene" id=1] |
| 4 | 4 | [ext_resource path="res://game/player/player_core_local_input.gd" type="Script" id=2] |
| 5 | 5 | [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] | |
| 7 | 7 | [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] | |
| 11 | 8 | [ext_resource path="res://assets/sounds/player/fire_grapplinghook1.mp3" type="AudioStream" id=9] |
| 12 | 9 | |
| 13 | [sub_resource type="SpatialMaterial" id=1] | |
| 14 | flags_unshaded = true | |
| 15 | flags_no_depth_test = true | |
| 16 | flags_fixed_size = true | |
| 17 | flags_do_not_receive_shadows = true | |
| 18 | flags_disable_ambient_light = true | |
| 19 | albedo_color = Color( 0.407843, 0, 0, 1 ) | |
| 20 | ||
| 21 | 10 | [node name="PlayerCoreLocal" instance=ExtResource( 1 )] |
| 22 | 11 | |
| 23 | 12 | [node name="Sound_Jump" parent="Model" index="2"] |
| 24 | 13 | transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) |
| 25 | 14 | |
| 26 | [node name="Sound_Shoot_GrapplingHook_1" type="AudioStreamPlayer3D" parent="Model" index="7"] | |
| 15 | [node name="Sound_Shoot_GrapplingHook_1" parent="Model" index="7"] | |
| 27 | 16 | transform = Transform( 1.53846, 0, 0, 0, 1.53846, 0, 0, 0, 1.53846, 0, 0, 0 ) |
| 28 | 17 | stream = ExtResource( 9 ) |
| 29 | ||
| 30 | [node name="Sound_Shoot_GrapplingHook" parent="Model" index="8"] | |
| 31 | stream = ExtResource( 9 ) | |
| 32 | ||
| 33 | [node name="GrappleVisualLine_1" parent="Model/LineHelper" index="0" instance=ExtResource( 7 )] | |
| 34 | transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0.753, 0 ) | |
| 35 | visible = false | |
| 36 | ||
| 37 | [node name="GrappleVisualLine" parent="Model/LineHelper" index="1"] | |
| 38 | material = ExtResource( 8 ) | |
| 18 | attenuation_filter_cutoff_hz = 5000.0 | |
| 39 | 19 | |
| 40 | 20 | [node name="AnimationTree" parent="." index="3"] |
| 41 | 21 | active = true |
| … | … | @@ -57,7 +37,7 @@ enabled = true |
| 57 | 37 | cast_to = Vector3( 0, 0, -400 ) |
| 58 | 38 | collision_mask = 2 |
| 59 | 39 | debug_shape_custom_color = Color( 1, 0, 0, 1 ) |
| 60 | debug_shape_thickness = 5.0 | |
| 40 | debug_shape_thickness = 5 | |
| 61 | 41 | |
| 62 | 42 | [node name="ClippedCamera" type="ClippedCamera" parent="CameraHead/CameraPivot" index="1"] |
| 63 | 43 | transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5 ) |
| … | … | @@ -65,22 +45,7 @@ fov = 90.0 |
| 65 | 45 | |
| 66 | 46 | [node name="PlayerDebugUI" parent="." index="7" instance=ExtResource( 5 )] |
| 67 | 47 | |
| 68 | [node name="GrappleVisualPoint" parent="GrapplingHook" index="0" instance=ExtResource( 6 )] | |
| 69 | transform = 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"] | |
| 72 | visible = false | |
| 73 | cast_shadow = 0 | |
| 74 | radius = 0.025 | |
| 75 | radial_segments = 22 | |
| 76 | rings = 22 | |
| 77 | material = SubResource( 1 ) | |
| 78 | ||
| 79 | [node name="GrappleVisualPoint_2" type="Sprite3D" parent="GrapplingHook" index="2"] | |
| 80 | visible = false | |
| 81 | cast_shadow = 0 | |
| 82 | billboard = 1 | |
| 83 | texture = ExtResource( 4 ) | |
| 48 | [node name="GrappleVisualPoint_1" parent="GrapplingHook" index="0" instance=ExtResource( 4 )] | |
| 84 | 49 | |
| 85 | 50 | [connection signal="player_jump" from="Input" to="." method="_on_Input_player_jump"] |
| 86 | 51 | [connection signal="player_mousemotion_event" from="Input" to="." method="_on_Input_player_mousemotion_event"] |
| … | … | @@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 ) |
| 187 | 187 | nodes/walk_scale/position = Vector2( -640, 360 ) |
| 188 | 188 | nodes/wall_run/node = SubResource( 50 ) |
| 189 | 189 | nodes/wall_run/position = Vector2( 720, -60 ) |
| 190 | node_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" ] | |
| 190 | node_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" ] |