81 lines
3.1 KiB
Plaintext
81 lines
3.1 KiB
Plaintext
[gd_scene load_steps=7 format=3 uid="uid://dcgsrdacswacl"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://cl7a4q5m73vlw" path="res://models/player/character.blend" id="1_eqqp1"]
|
|
[ext_resource type="PackedScene" uid="uid://clspx5suh5ywx" path="res://models/player/bash_attack.blend" id="2_uxov2"]
|
|
[ext_resource type="PackedScene" uid="uid://cdyr4yad84cp2" path="res://models/pickups/twirly.blend" id="3_nmc1l"]
|
|
[ext_resource type="PackedScene" uid="uid://c6p8iu3mpsbwv" path="res://objects/game_over_effect.tscn" id="4_nmc1l"]
|
|
|
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
|
|
radius = 0.339355
|
|
height = 2.15448
|
|
|
|
[sub_resource type="GDScript" id="GDScript_eqqp1"]
|
|
script/source = "extends Camera3D
|
|
@export var dist : float = 2.0
|
|
@export var pivot_height : float = 1.0
|
|
@export var look_target_height : float = 1.0
|
|
|
|
func _ready():
|
|
self.top_level = true
|
|
|
|
func _physics_process(_delta):
|
|
var target : Vector3 = get_parent().global_position + Vector3(0.0, pivot_height, 0.0)
|
|
var diff := self.global_position - target
|
|
if abs(diff).x + abs(diff.z) > 0.1:
|
|
self.look_at_from_position(target + diff.normalized() * dist, get_parent().global_position + Vector3(0.0, look_target_height, 0.0))
|
|
else:
|
|
self.global_position = target + diff.normalized() * dist
|
|
"
|
|
|
|
[node name="Player" type="PlayerBody"]
|
|
physics_interpolation_mode = 1
|
|
collision_layer = 2
|
|
collision_mask = 3
|
|
wall_min_slide_angle = 0.785398
|
|
floor_max_angle = 0.460767
|
|
floor_snap_length = 0.35
|
|
stopping_deceleration = 40.0
|
|
start_speed = 10.0
|
|
acceleration = 13.0
|
|
split_step_time = 0.3
|
|
split_step_stop_time = 0.25
|
|
bash_speed = 75.0
|
|
bash_time = 0.4
|
|
extra_bash_time = 0.2
|
|
jump_impulse = Vector2(0.7, 5)
|
|
|
|
[node name="PlayerStateMachine" type="PlayerStateMachine" parent="."]
|
|
unique_name_in_owner = true
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.05124, 0)
|
|
shape = SubResource("CapsuleShape3D_bxedw")
|
|
|
|
[node name="Camera3D" type="Camera3D" parent="."]
|
|
transform = Transform3D(-1, -6.18173e-08, -6.18173e-08, -6.71313e-08, 0.99594, 0.0900246, 5.60012e-08, 0.0900246, -0.99594, 3.76484e-07, 1.43409, -2.96511)
|
|
fov = 100.0
|
|
script = SubResource("GDScript_eqqp1")
|
|
dist = 1.75
|
|
pivot_height = 2.1
|
|
look_target_height = 2.2
|
|
|
|
[node name="character" parent="." instance=ExtResource("1_eqqp1")]
|
|
unique_name_in_owner = true
|
|
|
|
[node name="bash_attack" parent="character" instance=ExtResource("2_uxov2")]
|
|
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 6.60846e-09, 1.19557, 0.0755919)
|
|
visible = false
|
|
|
|
[node name="jump_effect" type="Node3D" parent="character"]
|
|
visible = false
|
|
|
|
[node name="twirly" parent="character/jump_effect" instance=ExtResource("3_nmc1l")]
|
|
transform = Transform3D(0.321382, -0.0898554, 0.0472911, -0.0208723, 0.0951608, 0.322654, -0.099372, -0.310592, 0.085175, -0.190964, 1.56847, 0.0617094)
|
|
|
|
[node name="twirly2" parent="character/jump_effect" instance=ExtResource("3_nmc1l")]
|
|
transform = Transform3D(-0.225283, 0.241709, -0.0664951, -0.11224, -0.0173125, 0.317332, 0.224158, 0.234252, 0.0920642, 0.165191, 1.56847, 0.0617094)
|
|
|
|
[node name="GameOverEffect" parent="." instance=ExtResource("4_nmc1l")]
|
|
|
|
[editable path="character"]
|