Starter-Kit-City-Builder/scenes/character.tscn

91 lines
2.7 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://b4gkfwf4i3ydl"]
[ext_resource type="Script" uid="uid://c2u81fdo7uou3" path="res://scripts/mission/character_controller.gd" id="1_g3a7y"]
[ext_resource type="PackedScene" uid="uid://h2jjkvc4edsp" path="res://people/character-female-d.glb" id="2_d5jmi"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_b4w3n"]
radius = 0.2
height = 0.6
[sub_resource type="Animation" id="Animation_reset"]
resource_name = "RESET"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("character-female-d:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_idle"]
resource_name = "idle"
length = 2.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("character-female-d:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1, 2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0.025, 0), Vector3(0, 0, 0)]
}
[sub_resource type="Animation" id="Animation_walk"]
resource_name = "walk"
length = 0.5
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("character-female-d:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.125, 0.25, 0.375, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0.05, 0), Vector3(0, 0, 0), Vector3(0, 0.05, 0), Vector3(0, 0, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8ib1s"]
_data = {
&"RESET": SubResource("Animation_reset"),
&"idle": SubResource("Animation_idle"),
&"walk": SubResource("Animation_walk")
}
[node name="Character" type="CharacterBody3D"]
script = ExtResource("1_g3a7y")
walk_speed = 1.5
patrol_distance = 6.0
character_model = NodePath("character-female-d")
wait_time_min = 1.5
wait_time_max = 4.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0)
shape = SubResource("CapsuleShape3D_b4w3n")
[node name="character-female-d" parent="." instance=ExtResource("2_d5jmi")]
transform = Transform3D(0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 0, 0, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_8ib1s")
}
autoplay = "walk"
speed_scale = 3.0
[node name="NotifyTimer" type="Timer" parent="."]
wait_time = 2.0
autostart = true