477 lines
20 KiB
Text
477 lines
20 KiB
Text
[gd_scene format=3 uid="uid://8t87iy0t0igo"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://c1g1vy67lf550" path="res://assets/character/player/player.tscn" id="1_eqqp1"]
|
|
|
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
|
|
radius = 0.4
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_1oybq"]
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_f46kd"]
|
|
|
|
[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_ykyjo"]
|
|
fadeout_time = 0.02
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vqq2l"]
|
|
animation = &"hang-clamber"
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_ykyjo"]
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_4vq5b"]
|
|
animation = &"fall"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3rerk"]
|
|
animation = &"RESET"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3nfmf"]
|
|
animation = &"jump"
|
|
|
|
[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_eqqp1"]
|
|
fadein_time = 0.05
|
|
fadeout_time = 0.05
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_42cpl"]
|
|
animation = &"hang"
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_uxov2"]
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_i825w"]
|
|
animation = &"run-start"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3rfka"]
|
|
animation = &"run"
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_i8sra"]
|
|
switch_mode = 2
|
|
advance_mode = 2
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4vq5b"]
|
|
advance_mode = 2
|
|
|
|
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_eqqp1"]
|
|
advance_mode = 2
|
|
advance_expression = "(abs(body.velocity.x) + abs(body.velocity.z)) < 1.0"
|
|
|
|
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_3nfmf"]
|
|
state_machine_type = 1
|
|
states/run/node = SubResource("AnimationNodeAnimation_3rfka")
|
|
states/run/position = Vector2(603.5664, 100)
|
|
states/run-start/node = SubResource("AnimationNodeAnimation_i825w")
|
|
states/run-start/position = Vector2(439.96094, 100)
|
|
transitions = ["run-start", "run", SubResource("AnimationNodeStateMachineTransition_i8sra"), "Start", "run-start", SubResource("AnimationNodeStateMachineTransition_4vq5b"), "run", "run-start", SubResource("AnimationNodeStateMachineTransition_eqqp1")]
|
|
graph_offset = Vector2(-64.40625, 19.996094)
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_i8sra"]
|
|
animation = &"skid"
|
|
|
|
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jbsc3"]
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_3rerk"]
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_nmc1l"]
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_uxov2"]
|
|
animation = &"grip"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_f46kd"]
|
|
animation = &"wallrun_left"
|
|
|
|
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nmc1l"]
|
|
animation = &"wallrun_right"
|
|
|
|
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_eqqp1"]
|
|
|
|
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_uxov2"]
|
|
nodes/output/position = Vector2(1140, 140)
|
|
nodes/RunStates/node = SubResource("AnimationNodeStateMachine_3nfmf")
|
|
nodes/RunStates/position = Vector2(-400, -560)
|
|
nodes/Decelerating/node = SubResource("AnimationNodeBlend2_ykyjo")
|
|
nodes/Decelerating/position = Vector2(60, -560)
|
|
nodes/Air/node = SubResource("AnimationNodeBlend2_1oybq")
|
|
nodes/Air/position = Vector2(480, -280)
|
|
nodes/Speed/node = SubResource("AnimationNodeTimeScale_jbsc3")
|
|
nodes/Speed/position = Vector2(-160, -560)
|
|
nodes/Wall/node = SubResource("AnimationNodeBlend2_3rerk")
|
|
nodes/Wall/position = Vector2(700, -60)
|
|
nodes/WallAction/node = SubResource("AnimationNodeBlend2_nmc1l")
|
|
nodes/WallAction/position = Vector2(480, 20)
|
|
nodes/WallGripLoop/node = SubResource("AnimationNodeAnimation_uxov2")
|
|
nodes/WallGripLoop/position = Vector2(260, 20)
|
|
nodes/WallRunLeftLoop/node = SubResource("AnimationNodeAnimation_f46kd")
|
|
nodes/WallRunLeftLoop/position = Vector2(40, 200)
|
|
nodes/WallRunSide/node = SubResource("AnimationNodeBlend2_eqqp1")
|
|
nodes/WallRunSide/position = Vector2(260, 200)
|
|
nodes/WallRunRightLoop/node = SubResource("AnimationNodeAnimation_nmc1l")
|
|
nodes/WallRunRightLoop/position = Vector2(40, 380)
|
|
nodes/SkidStopLoop/node = SubResource("AnimationNodeAnimation_i8sra")
|
|
nodes/SkidStopLoop/position = Vector2(-160, -380)
|
|
nodes/IdleLoop/node = SubResource("AnimationNodeAnimation_3rerk")
|
|
nodes/IdleLoop/position = Vector2(60, -740)
|
|
nodes/Moving/node = SubResource("AnimationNodeBlend2_uxov2")
|
|
nodes/Moving/position = Vector2(260, -560)
|
|
nodes/AirTime/node = SubResource("AnimationNodeBlend2_f46kd")
|
|
nodes/AirTime/position = Vector2(260, -280)
|
|
nodes/Jumping/node = SubResource("AnimationNodeAnimation_3nfmf")
|
|
nodes/Jumping/position = Vector2(60, -280)
|
|
nodes/Falling/node = SubResource("AnimationNodeAnimation_4vq5b")
|
|
nodes/Falling/position = Vector2(60, -100)
|
|
nodes/Ledge/node = SubResource("AnimationNodeOneShot_eqqp1")
|
|
nodes/Ledge/position = Vector2(920, 140)
|
|
nodes/LedgeLoop/node = SubResource("AnimationNodeAnimation_42cpl")
|
|
nodes/LedgeLoop/position = Vector2(480, 300)
|
|
nodes/ClimbUp/node = SubResource("AnimationNodeOneShot_ykyjo")
|
|
nodes/ClimbUp/position = Vector2(700, 260)
|
|
nodes/ClimbUpClip/node = SubResource("AnimationNodeAnimation_vqq2l")
|
|
nodes/ClimbUpClip/position = Vector2(480, 480)
|
|
node_connections = [&"output", 0, &"Ledge", &"Decelerating", 0, &"Speed", &"Decelerating", 1, &"SkidStopLoop", &"Air", 0, &"Moving", &"Air", 1, &"AirTime", &"Speed", 0, &"RunStates", &"Wall", 0, &"Air", &"Wall", 1, &"WallAction", &"WallAction", 0, &"WallGripLoop", &"WallAction", 1, &"WallRunSide", &"WallRunSide", 0, &"WallRunLeftLoop", &"WallRunSide", 1, &"WallRunRightLoop", &"Moving", 0, &"IdleLoop", &"Moving", 1, &"Decelerating", &"AirTime", 0, &"Jumping", &"AirTime", 1, &"Falling", &"Ledge", 0, &"Wall", &"Ledge", 1, &"ClimbUp", &"ClimbUp", 0, &"LedgeLoop", &"ClimbUp", 1, &"ClimbUpClip"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_i825w"]
|
|
resource_name = "PlayerAnimationPlayer"
|
|
script/source = "extends AnimationTree
|
|
|
|
@onready var body := get_owner() as PlayerBody
|
|
@onready var behaviour_tree : PlayerBehaviourTree = $\"../../PlayerBehaviourTree\"
|
|
@export var default_blend_time : float
|
|
|
|
@export var full_speed : float
|
|
@export var min_skid_speed : float
|
|
@export var skid_blend_speed : float
|
|
@export var jump_to_fall_speed : float
|
|
@export var air_blend_speed : float
|
|
|
|
func property_move_toward(property : String, target, speed) -> float:
|
|
var current = get(property)
|
|
var diff = target - current
|
|
var dir = sign(diff)
|
|
var new_value = current
|
|
if abs(diff) <= speed:
|
|
new_value = target
|
|
else:
|
|
new_value = current + dir * speed
|
|
if new_value == current:
|
|
return current
|
|
else:
|
|
set(property, new_value)
|
|
return new_value
|
|
|
|
func _process(delta: float) -> void:
|
|
var speed : float = abs(body.velocity.x) + abs(body.velocity.z)
|
|
set(\"parameters/Speed/scale\", clamp(speed / full_speed, 0.0, 1.0))
|
|
var deceleration_distance : float = 0.0 if behaviour_tree.get_world_move_input().dot(body.velocity) > 0.0 else clamp(speed / min_skid_speed, 0.0, 1.0)
|
|
property_move_toward(\"parameters/Decelerating/blend_amount\", deceleration_distance, delta * min_skid_speed)
|
|
property_move_toward(\"parameters/Moving/blend_amount\", 1.0 if speed > 0.05 else 0.0, delta * default_blend_time)
|
|
var in_air : bool = 1.0 == property_move_toward(\"parameters/Air/blend_amount\", 0.0 if body.is_on_floor() else 1.0, delta * air_blend_speed)
|
|
if in_air:
|
|
property_move_toward(\"parameters/AirTime/blend_amount\", 1.0, delta * jump_to_fall_speed)
|
|
if body.is_on_floor():
|
|
set(\"parameters/Wall/blend_amount\", 0.0)
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_f46kd"]
|
|
resource_name = "HangRay"
|
|
script/source = "@tool extends RayCast3D
|
|
|
|
@onready var body : PlayerBody = get_owner() as Node3D
|
|
@export var dist_mul : float
|
|
@export var height : float = 1.0
|
|
var last_direction : Vector3 = Vector3.BACK
|
|
|
|
func _ready() -> void:
|
|
add_exception(body)
|
|
|
|
func _physics_process(_delta : float):
|
|
if Engine.is_editor_hint() and body:
|
|
global_position = body.global_position + Vector3.UP * height + Vector3.BACK * dist_mul
|
|
elif body:
|
|
var direction : Vector3 = -body.velocity
|
|
if body.is_on_wall():
|
|
direction = body.get_wall_normal()
|
|
direction = Vector3(direction.x, 0, direction.z).normalized()
|
|
if not direction.is_zero_approx():
|
|
last_direction = direction
|
|
global_position = body.global_position + Vector3.UP * height + last_direction * dist_mul
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_3rerk"]
|
|
resource_name = "BelowLedgePrerequisite"
|
|
script/source = "extends PlayerAction
|
|
|
|
var timeout : bool = false
|
|
|
|
func _ready():
|
|
%LedgeHangTimer.timeout.connect(set.bind(\"timeout\", false))
|
|
|
|
func _enter() -> int:
|
|
blackboard.hang_ray.force_raycast_update()
|
|
if not timeout and not body.is_on_floor() and blackboard.hang_ray.is_colliding() and blackboard.hang_ray.get_collision_normal().y > 0.9 and body.is_on_wall():
|
|
timeout = true
|
|
return Success
|
|
else:
|
|
return Fail
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_uxov2"]
|
|
resource_name = "PlayerLedgeHangAction"
|
|
script/source = "extends PlayerAction
|
|
|
|
var wall_normal : Vector3
|
|
|
|
func _enter() -> int:
|
|
blackboard.anim.set(\"parameters/Ledge/request\", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
|
|
blackboard.anim.set(\"parameters/Air/blend_amount\", 0.0)
|
|
wall_normal = body.get_wall_normal()
|
|
wall_normal = Vector3(wall_normal.x, 0, wall_normal.z).normalized()
|
|
blackboard.character.look_at(blackboard.character.global_position - wall_normal)
|
|
return Running
|
|
|
|
func _execute() -> int:
|
|
if get_status() == Running:
|
|
var diff : Vector3 = blackboard.hang_ray.get_collision_point() - blackboard.hang_ray.global_position
|
|
body.velocity = Vector3.ZERO
|
|
body.global_position = body.global_position.lerp(body.global_position + diff, 0.25)
|
|
var input_dot_wall : float = wall_normal.dot(blackboard.get_world_move_input())
|
|
if diff.length() < 0.05 and input_dot_wall < -0.5:
|
|
return Success
|
|
if body.is_on_floor() or input_dot_wall > 0.5:
|
|
blackboard.anim.set(\"parameters/Ledge/request\", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT);
|
|
return Fail
|
|
return get_status()
|
|
|
|
func _exit():
|
|
%LedgeHangTimer.start()
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_i8sra"]
|
|
resource_name = "PlayerLedgeClimbAnimation"
|
|
script/source = "extends PlayerAnimationAction
|
|
|
|
func _exit():
|
|
blackboard.anim.set(\"parameters/Wall/blend_amount\", 0.0)
|
|
blackboard.anim.set(\"parameters/Air/blend_amount\", 0.0)
|
|
blackboard.anim.set(\"parameters/Ledge/request\", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_nmc1l"]
|
|
resource_name = "WallGripAction"
|
|
script/source = "extends PlayerAction
|
|
|
|
@export var wall_drag : float
|
|
@export var max_y_velocity : float
|
|
@export var jump_normal_force : float
|
|
@export var jump_vertical_force : float
|
|
|
|
func _enter() -> int:
|
|
var flat_wall := Vector3(body.get_wall_normal().x, 0, body.get_wall_normal().z)
|
|
var input_into_wall := blackboard.get_world_move_input().normalized().dot(body.get_wall_normal()) < -0.7
|
|
if body.is_on_wall_only() and input_into_wall:
|
|
if Input.is_action_just_pressed(\"jump\"):
|
|
body.velocity = flat_wall * jump_normal_force
|
|
body.velocity.y = jump_vertical_force
|
|
blackboard.character.look_at(blackboard.character.global_position + Vector3(body.velocity.x, 0, body.velocity.z))
|
|
blackboard.anim.set(\"parameters/AirTime/blend_amount\", 0.0)
|
|
else:
|
|
var delta := get_process_delta_time()
|
|
var target_velocity := Vector3(0, clamp(body.velocity.y, -max_y_velocity, 0.0), 0)
|
|
body.velocity = body.velocity.move_toward(target_velocity, wall_drag * delta) + (body.get_gravity() * 0.2 * delta)
|
|
body.velocity.y = min(body.velocity.y, 0.0)
|
|
blackboard.character.look_at(blackboard.character.global_position + body.get_wall_normal())
|
|
blackboard.anim.set(\"parameters/WallAction/blend_amount\", 0.0)
|
|
blackboard.anim.property_move_toward(\"parameters/Wall/blend_amount\", 1.0 if body.is_on_wall_only() else 0.0, delta * blackboard.anim.default_blend_time)
|
|
return Success
|
|
return Fail
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_3rfka"]
|
|
resource_name = "PlayerWallRunAction"
|
|
script/source = "extends PlayerAction
|
|
|
|
@export var gravity_scale : float
|
|
@export var drag : float
|
|
@export var blend_in_time : float
|
|
@export var min_ground_speed : float
|
|
@export var jump_normal_force : float
|
|
@export var jump_input_force : float
|
|
@export var jump_vertical_force : float
|
|
@export var min_run_time : float
|
|
|
|
var run_time : float = 0.0
|
|
|
|
func _enter() -> int:
|
|
var flat_velocity := Vector2(body.velocity.x, body.velocity.z)
|
|
var input_velocity_dot : float = blackboard.get_world_move_input().normalized().dot(body.velocity.normalized())
|
|
var ground_velocity := Vector3(body.velocity.x, 0, body.velocity.z)
|
|
if body.is_on_wall_only() and input_velocity_dot > 0.01 and ground_velocity.length() >= min_ground_speed and flat_velocity.length() > -body.velocity.y * 4.0:
|
|
if Input.is_action_just_pressed(\"jump\") and run_time > min_run_time:
|
|
var wall_flat := Vector3(body.get_wall_normal().x, 0, body.get_wall_normal().z)
|
|
body.velocity = wall_flat * jump_normal_force + (ground_velocity + blackboard.get_world_move_input()).normalized() * jump_input_force * ground_velocity.length()
|
|
body.velocity.y = max(0, body.velocity.y) + jump_vertical_force
|
|
blackboard.character.look_at(blackboard.character.global_position + ground_velocity)
|
|
else:
|
|
run_time += get_process_delta_time()
|
|
body.velocity *= 1 - drag
|
|
body.velocity += body.get_gravity() * get_process_delta_time() * gravity_scale
|
|
blackboard.character.look_at(blackboard.character.global_position + body.velocity)
|
|
blackboard.anim.set(\"parameters/WallAction/blend_amount\", 1.0)
|
|
blackboard.anim.property_move_toward(\"parameters/Wall/blend_amount\", 1.0, get_process_delta_time() * blend_in_time)
|
|
var dot : float = body.get_wall_normal().dot(blackboard.character.basis.x)
|
|
blackboard.anim.set(\"parameters/WallRunSide/blend_amount\", 0.0 if dot > 0 else 1.0)
|
|
return Success
|
|
else:
|
|
run_time = 0.0
|
|
return Fail
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_ykyjo"]
|
|
resource_name = "FallingAction"
|
|
script/source = "extends PlayerAction
|
|
|
|
@export var drag : float = 0.001
|
|
|
|
func _enter() -> int:
|
|
if not body.is_on_floor():
|
|
body.velocity *= 1.0 - drag
|
|
body.velocity += body.get_gravity() * get_process_delta_time()
|
|
var look_direction := Vector3(blackboard.character.global_basis.z.x, 0, blackboard.character.global_basis.z.z)
|
|
blackboard.character.look_at(blackboard.character.global_position - look_direction)
|
|
blackboard.anim.property_move_toward(\"parameters/Wall/blend_amount\", 0.0, get_process_delta_time() * 15)
|
|
return Success
|
|
else:
|
|
return Fail
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_eqqp1"]
|
|
resource_name = "JumpAction"
|
|
script/source = "extends PlayerAction
|
|
|
|
@export var vertical_jump_velocity : float
|
|
|
|
func _enter() -> int:
|
|
if Input.is_action_just_pressed(\"jump\"):
|
|
body.velocity.y = vertical_jump_velocity
|
|
blackboard.anim.set(\"parameters/AirTime/blend_amount\", 0.0)
|
|
return Success
|
|
else:
|
|
return Fail
|
|
"
|
|
|
|
[sub_resource type="GDScript" id="GDScript_bxedw"]
|
|
resource_name = "RunningAction"
|
|
script/source = "extends PlayerMovementAction
|
|
|
|
func _enter() -> int:
|
|
process_movement(true)
|
|
return Success
|
|
"
|
|
|
|
[node name="Player" type="PlayerBody" unique_id=591139793]
|
|
floor_snap_length = 0.3
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1143027860]
|
|
shape = SubResource("CapsuleShape3D_bxedw")
|
|
|
|
[node name="HeightRay" type="RayCast3D" parent="." unique_id=1763928231]
|
|
unique_name_in_owner = true
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
|
target_position = Vector3(0, -100, 0)
|
|
|
|
[node name="PlayerModel" parent="." unique_id=1710695753 instance=ExtResource("1_eqqp1")]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
|
|
|
|
[node name="AnimationTree" type="AnimationTree" parent="PlayerModel" unique_id=847372421]
|
|
root_motion_track = NodePath("HumanArmature/Skeleton3D:root")
|
|
tree_root = SubResource("AnimationNodeBlendTree_uxov2")
|
|
anim_player = NodePath("../AnimationPlayer")
|
|
parameters/Decelerating/blend_amount = 0.0
|
|
parameters/Air/blend_amount = 0.0
|
|
parameters/Speed/scale = 1.0
|
|
parameters/Wall/blend_amount = 0.0
|
|
parameters/WallAction/blend_amount = 0.0
|
|
parameters/WallRunSide/blend_amount = 0.0
|
|
parameters/Moving/blend_amount = 0.0
|
|
parameters/AirTime/blend_amount = 0.0
|
|
parameters/Ledge/active = false
|
|
parameters/Ledge/internal_active = false
|
|
parameters/Ledge/request = 0
|
|
parameters/ClimbUp/active = false
|
|
parameters/ClimbUp/internal_active = false
|
|
parameters/ClimbUp/request = 0
|
|
script = SubResource("GDScript_i825w")
|
|
default_blend_time = 30.0
|
|
full_speed = 7.0
|
|
min_skid_speed = 5.0
|
|
skid_blend_speed = 5.0
|
|
jump_to_fall_speed = 3.0
|
|
air_blend_speed = 6.0
|
|
|
|
[node name="HangRay" type="RayCast3D" parent="PlayerModel" unique_id=183285060]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -0.508)
|
|
top_level = true
|
|
enabled = false
|
|
target_position = Vector3(0, -1.604, 0)
|
|
hit_back_faces = false
|
|
script = SubResource("GDScript_f46kd")
|
|
dist_mul = -0.508
|
|
|
|
[node name="Camera3D" type="PlayerCamera" parent="." unique_id=709217818]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.3841858e-07, 0.81082594, 1.2089427)
|
|
fov = 96.8
|
|
target_distance = 3.077
|
|
|
|
[node name="PlayerBehaviourTree" type="PlayerBehaviourTree" parent="." unique_id=1439326326 node_paths=PackedStringArray("character")]
|
|
character = NodePath("../PlayerModel")
|
|
|
|
[node name="BehaviourRepeater" type="BehaviourRepeater" parent="PlayerBehaviourTree" unique_id=766320099]
|
|
|
|
[node name="ActionSelector" type="BehaviourSelector" parent="PlayerBehaviourTree/BehaviourRepeater" unique_id=433229675]
|
|
|
|
[node name="LedgeHangSequence" type="BehaviourSequence" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=285489367]
|
|
|
|
[node name="CanLedgeHang" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector/LedgeHangSequence" unique_id=1704888964]
|
|
script = SubResource("GDScript_3rerk")
|
|
|
|
[node name="BehaviourAlwaysSuccess" type="BehaviourAlwaysSuccess" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector/LedgeHangSequence" unique_id=1899198413]
|
|
|
|
[node name="LedgeActionsSequence" type="BehaviourSequence" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector/LedgeHangSequence/BehaviourAlwaysSuccess" unique_id=524493208]
|
|
|
|
[node name="LedgeHang" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector/LedgeHangSequence/BehaviourAlwaysSuccess/LedgeActionsSequence" unique_id=189327718]
|
|
script = SubResource("GDScript_uxov2")
|
|
|
|
[node name="LedgeClimbAnimation" type="PlayerAnimationAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector/LedgeHangSequence/BehaviourAlwaysSuccess/LedgeActionsSequence" unique_id=980794512]
|
|
one_shot_path = "ClimbUp"
|
|
script = SubResource("GDScript_i8sra")
|
|
|
|
[node name="LedgeHangTimer" type="Timer" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector/LedgeHangSequence" unique_id=465275658]
|
|
unique_name_in_owner = true
|
|
process_mode = 1
|
|
|
|
[node name="WallGrip" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=85039173]
|
|
script = SubResource("GDScript_nmc1l")
|
|
wall_drag = 15.0
|
|
max_y_velocity = 4.0
|
|
jump_normal_force = 5.0
|
|
jump_vertical_force = 6.0
|
|
|
|
[node name="WallRun" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=2090512639]
|
|
script = SubResource("GDScript_3rfka")
|
|
gravity_scale = 0.169
|
|
drag = 0.013
|
|
blend_in_time = 50.0
|
|
min_ground_speed = 5.0
|
|
jump_normal_force = 4.0
|
|
jump_input_force = 1.3
|
|
jump_vertical_force = 4.0
|
|
min_run_time = 0.05
|
|
|
|
[node name="Fall" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=570179125]
|
|
script = SubResource("GDScript_ykyjo")
|
|
drag = 0.003
|
|
|
|
[node name="Jump" type="PlayerAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=553747039]
|
|
script = SubResource("GDScript_eqqp1")
|
|
vertical_jump_velocity = 5.0
|
|
|
|
[node name="Run" type="PlayerMovementAction" parent="PlayerBehaviourTree/BehaviourRepeater/ActionSelector" unique_id=2080183164]
|
|
target_speed = 10.0
|
|
acceleration = 25.0
|
|
deceleration = 30.0
|
|
script = SubResource("GDScript_bxedw")
|