Files
chaussette.sale/caracters/player/player.tscn
2025-03-31 13:13:07 +02:00

104 lines
4.3 KiB
Plaintext

[gd_scene load_steps=13 format=3 uid="uid://vclpg4e4ql54"]
[ext_resource type="Script" path="res://caracters/human.gd" id="1_l1sti"]
[ext_resource type="Script" path="res://caracters/player/player_controler.gd" id="1_oapm5"]
[ext_resource type="AnimationNodeStateMachine" uid="uid://ddr1ltkievtku" path="res://animations/human/human_state_machine.tres" id="3_1y7fn"]
[ext_resource type="PackedScene" uid="uid://bvsendl25xjju" path="res://animations/human/human_animation_player.tscn" id="3_c286j"]
[ext_resource type="PackedScene" uid="uid://cg4dhp7qe68pt" path="res://animations/human/human.tscn" id="4_rsj36"]
[ext_resource type="PackedScene" uid="uid://brh7cqaxc13ie" path="res://zindex/ZIndexControler.tscn" id="5_pb07x"]
[ext_resource type="PackedScene" uid="uid://cjm4k0fv7eger" path="res://caracters/human_pathfinder.tscn" id="7_g6pgs"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_a4vmx"]
radius = 5.0
height = 44.0
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_85jde"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_iwsa7"]
nodes/HumanState/node = ExtResource("3_1y7fn")
nodes/HumanState/position = Vector2(133.333, 120)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_85jde")
nodes/TimeScale/position = Vector2(453.333, 53.3333)
nodes/output/position = Vector2(640, 146.667)
node_connections = [&"TimeScale", 0, &"HumanState", &"output", 0, &"TimeScale"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1kv0e"]
size = Vector2(40, 10)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_11ib5"]
size = Vector2(20, 150)
[node name="CharacterBody2D" type="CharacterBody2D"]
z_index = 100
motion_mode = 1
script = ExtResource("1_l1sti")
metadata/_edit_vertical_guides_ = [-20.0]
metadata/_edit_horizontal_guides_ = [48.0]
[node name="AudioListener2D" type="AudioListener2D" parent="."]
[node name="Camera2D" type="Camera2D" parent="."]
zoom = Vector2(1.5, 1.5)
position_smoothing_enabled = true
drag_horizontal_enabled = true
drag_vertical_enabled = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 43)
rotation = 1.5708
shape = SubResource("CapsuleShape2D_a4vmx")
[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource("AnimationNodeBlendTree_iwsa7")
advance_expression_base_node = NodePath("..")
anim_player = NodePath("../AnimationPlayer")
parameters/HumanState/grabing/blend_position = Vector2(0, 0)
parameters/HumanState/idling/blend_position = Vector2(0.000657439, 1.0284)
parameters/HumanState/walking/blend_position = Vector2(0, 0)
parameters/TimeScale/scale = 1.0
[node name="AnimationPlayer" parent="." instance=ExtResource("3_c286j")]
[node name="Sprite2D" parent="." instance=ExtResource("4_rsj36")]
frame = 1
[node name="ZIndexControler" parent="." instance=ExtResource("5_pb07x")]
position = Vector2(-1, 37)
[node name="ShapeCast2D" type="ShapeCast2D" parent="ZIndexControler"]
position = Vector2(1, -13)
shape = SubResource("RectangleShape2D_1kv0e")
target_position = Vector2(0, -48)
[node name="Area2D" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0, 43)
rotation = 1.5708
shape = SubResource("CapsuleShape2D_a4vmx")
[node name="controleur" type="Node2D" parent="." node_paths=PackedStringArray("human", "ray", "pathFinder")]
script = ExtResource("1_oapm5")
human = NodePath("..")
ray = NodePath("../ShapeCast2D")
pathFinder = NodePath("../PathFinder")
[node name="ShapeCast2D" type="ShapeCast2D" parent="."]
shape = SubResource("RectangleShape2D_11ib5")
target_position = Vector2(1, 90)
collision_mask = 8
collide_with_areas = true
collide_with_bodies = false
[node name="PathFinder" parent="." instance=ExtResource("7_g6pgs")]
can_walk_on_roads = true
[connection signal="loadFromGameState" from="." to="controleur" method="_on_character_body_2d_load_from_game_state"]
[connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"]
[connection signal="area_entered" from="Area2D" to="controleur" method="_on_declencheur"]
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
[connection signal="body_entered" from="Area2D" to="controleur" method="_on_area_2d_body_entered"]
[connection signal="body_exited" from="Area2D" to="controleur" method="_on_area_2d_body_exited"]