Vast improvements and a working finite state machine, working on new guild member registration.
This commit is contained in:
114
test_adventurer_sprite.tscn
Normal file
114
test_adventurer_sprite.tscn
Normal file
@@ -0,0 +1,114 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://dew8gxu55ex6q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cjqumk0kw2vte" path="res://adventurer.gd" id="1_wif60"]
|
||||
[ext_resource type="Texture2D" uid="uid://bldpiytpdrge6" path="res://icon.svg" id="2_rwbq5"]
|
||||
[ext_resource type="Texture2D" uid="uid://cbamfadh7wwr7" path="res://speech-blip.png" id="3_71qlo"]
|
||||
[ext_resource type="Texture2D" uid="uid://1mmg270gotb1" path="res://busy-dots.png" id="4_ay0uu"]
|
||||
[ext_resource type="Script" uid="uid://w57riwplc00t" path="res://speech_bubble.gd" id="4_rwbq5"]
|
||||
[ext_resource type="Script" uid="uid://djd8pv5xbgud3" path="res://fsm/machines/test.gd" id="5_snss2"]
|
||||
[ext_resource type="Script" uid="uid://dl3b5aywu1hf6" path="res://fsm/nodes/wait.gd" id="6_1cj4e"]
|
||||
[ext_resource type="Script" uid="uid://e8we6nmaob1k" path="res://fsm/nodes/test.gd" id="7_ux5kh"]
|
||||
[ext_resource type="Script" uid="uid://bewrajxqdutsu" path="res://fsm/interact_with_employee.gd" id="9_snss2"]
|
||||
[ext_resource type="Script" uid="uid://y85swbbk8kbd" path="res://fsm/nodes/queue.gd" id="10_1cj4e"]
|
||||
[ext_resource type="Script" uid="uid://b0ewnwcibhu21" path="res://fsm/nodes/leave.gd" id="11_ux5kh"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_5n4iw"]
|
||||
radius = 35.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_bog1h"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D3:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_13vc8"]
|
||||
resource_name = "busy"
|
||||
length = 0.7000034
|
||||
loop_mode = 1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D3:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 1, 2, 3, 4, 5, 6, 0]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_uo85v"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_bog1h"),
|
||||
&"busy": SubResource("Animation_13vc8")
|
||||
}
|
||||
|
||||
[node name="AdventurerSprite" type="CharacterBody2D"]
|
||||
script = ExtResource("1_wif60")
|
||||
interaction_range = null
|
||||
stop_range = null
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
modulate = Color(0, 1, 0, 1)
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = ExtResource("2_rwbq5")
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||
path_desired_distance = 30.0
|
||||
avoidance_enabled = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_5n4iw")
|
||||
|
||||
[node name="SpeechBubble" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(39, -42)
|
||||
texture = ExtResource("3_71qlo")
|
||||
script = ExtResource("4_rwbq5")
|
||||
|
||||
[node name="Sprite2D3" type="Sprite2D" parent="SpeechBubble"]
|
||||
position = Vector2(0, -4)
|
||||
texture = ExtResource("4_ay0uu")
|
||||
hframes = 2
|
||||
vframes = 4
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="SpeechBubble"]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_uo85v")
|
||||
}
|
||||
|
||||
[node name="StateMachine" type="Node" parent="."]
|
||||
script = ExtResource("5_snss2")
|
||||
starting_state = "Queue"
|
||||
|
||||
[node name="Wait" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("6_1cj4e")
|
||||
wait_duration = 3.0
|
||||
|
||||
[node name="Test" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("7_ux5kh")
|
||||
message = "TEST COMPLETE!"
|
||||
|
||||
[node name="Interact With Employee" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("9_snss2")
|
||||
employee_name = "Receptionist"
|
||||
speech_bubble = "Talk"
|
||||
wait_duration = null
|
||||
interaction_args = Array[String](["register"])
|
||||
|
||||
[node name="Queue" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("10_1cj4e")
|
||||
employee = "Receptionist"
|
||||
|
||||
[node name="Node" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("11_ux5kh")
|
||||
Reference in New Issue
Block a user