From 9eb80a1c9b7bf761b14d8707b983d5725147a847 Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 22 Dec 2023 11:12:58 -0800 Subject: [PATCH] Add popups reflecting which objects are interactable --- assets/gui/emotes/emote__.png | Bin 0 -> 168 bytes assets/gui/emotes/emote__.png.import | 34 ++++ assets/gui/emotes/emote_exclamations.png | Bin 0 -> 192 bytes .../gui/emotes/emote_exclamations.png.import | 34 ++++ assets/gui/emotes/emote_question.png | Bin 0 -> 200 bytes assets/gui/emotes/emote_question.png.import | 34 ++++ data/maps/town/strange_tree_interaction.gd | 8 +- src/field/cutscenes/Interaction.tscn | 8 +- src/field/cutscenes/InteractionPopup.tscn | 26 +++ src/field/cutscenes/interaction_popup.gd | 34 ++++ .../conversations/conversation_template.gd | 3 +- src/field/cutscenes/templates/doors/door.tscn | 9 +- src/field/ui/popups/UIPopup.tscn | 87 ++++++++++ src/field/ui/popups/ui_popup.gd | 75 +++++++++ src/main.tscn | 157 ++++++++++++++++-- 15 files changed, 477 insertions(+), 32 deletions(-) create mode 100644 assets/gui/emotes/emote__.png create mode 100644 assets/gui/emotes/emote__.png.import create mode 100644 assets/gui/emotes/emote_exclamations.png create mode 100644 assets/gui/emotes/emote_exclamations.png.import create mode 100644 assets/gui/emotes/emote_question.png create mode 100644 assets/gui/emotes/emote_question.png.import create mode 100644 src/field/cutscenes/InteractionPopup.tscn create mode 100644 src/field/cutscenes/interaction_popup.gd create mode 100644 src/field/ui/popups/UIPopup.tscn create mode 100644 src/field/ui/popups/ui_popup.gd diff --git a/assets/gui/emotes/emote__.png b/assets/gui/emotes/emote__.png new file mode 100644 index 0000000000000000000000000000000000000000..4c5c9a2ca1807230df2e021c7cfbb8c6ee5f0cf2 GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9Ea{HEjtmSN`?>!lvI6;>0X`wF zK>FFUXaE2I7k7}p2IMf71o;IsI6S+N2ISa!x;Tb#Tu)9o5q0vwfo)k=S=d&FuAXL) zu{LUJlVbMORa1FZH!yTEbT_6Re09L;K$WD6a|4U?gyRQZ9AIGJ|0+``m+mGCG>E~| L)z4*}Q$iB}d_gvZ literal 0 HcmV?d00001 diff --git a/assets/gui/emotes/emote__.png.import b/assets/gui/emotes/emote__.png.import new file mode 100644 index 0000000..00a94d5 --- /dev/null +++ b/assets/gui/emotes/emote__.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://f2uyafsf3srw" +path="res://.godot/imported/emote__.png-81bb84473a338b622ad97daf0172b897.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/gui/emotes/emote__.png" +dest_files=["res://.godot/imported/emote__.png-81bb84473a338b622ad97daf0172b897.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/gui/emotes/emote_exclamations.png b/assets/gui/emotes/emote_exclamations.png new file mode 100644 index 0000000000000000000000000000000000000000..e32a605e4d33f0df6c6bf3ffe4d45cc88e3a8f4b GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFr_EDPg4uLPRU;OXk;vd$@?2>}1vOjQ5? literal 0 HcmV?d00001 diff --git a/assets/gui/emotes/emote_question.png.import b/assets/gui/emotes/emote_question.png.import new file mode 100644 index 0000000..ade05a9 --- /dev/null +++ b/assets/gui/emotes/emote_question.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cr7xb4q6b3hfm" +path="res://.godot/imported/emote_question.png-f8aa5ca3a92e9eb5eaa1f0e7a2a412f0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/gui/emotes/emote_question.png" +dest_files=["res://.godot/imported/emote_question.png-f8aa5ca3a92e9eb5eaa1f0e7a2a412f0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/data/maps/town/strange_tree_interaction.gd b/data/maps/town/strange_tree_interaction.gd index a0f8aa1..d01ffef 100644 --- a/data/maps/town/strange_tree_interaction.gd +++ b/data/maps/town/strange_tree_interaction.gd @@ -1,7 +1,5 @@ # Opens up a secret path once the 'Strange Tree' has been interacted with twice. -extends Interaction - -var _conversation: = preload("res://data/maps/town/strange_tree.dtl") +extends InteractionTemplateConversation @onready var _anim: = $AnimationPlayer as AnimationPlayer @@ -26,7 +24,3 @@ func _ready() -> void: CONNECT_ONE_SHOT ) ) - - -func _execute() -> void: - Dialogic.start_timeline(_conversation) diff --git a/src/field/cutscenes/Interaction.tscn b/src/field/cutscenes/Interaction.tscn index f37b772..39e8b50 100644 --- a/src/field/cutscenes/Interaction.tscn +++ b/src/field/cutscenes/Interaction.tscn @@ -8,13 +8,13 @@ radius = 4.0 [node name="Interaction" type="Node2D"] script = ExtResource("1_86ylf") -[node name="Area2D" type="Area2D" parent="."] +[node name="InteractionArea2D" type="Area2D" parent="."] collision_layer = 16 collision_mask = 8 -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractionArea2D"] shape = SubResource("CircleShape2D_jn5tq") debug_color = Color(1, 0.929412, 0.631373, 0.419608) -[connection signal="area_entered" from="Area2D" to="." method="_on_area_entered"] -[connection signal="area_exited" from="Area2D" to="." method="_on_area_exited"] +[connection signal="area_entered" from="InteractionArea2D" to="." method="_on_area_entered"] +[connection signal="area_exited" from="InteractionArea2D" to="." method="_on_area_exited"] diff --git a/src/field/cutscenes/InteractionPopup.tscn b/src/field/cutscenes/InteractionPopup.tscn new file mode 100644 index 0000000..3fed053 --- /dev/null +++ b/src/field/cutscenes/InteractionPopup.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=4 format=3 uid="uid://cubp81mykng3h"] + +[ext_resource type="PackedScene" uid="uid://dnd03as5e37he" path="res://src/field/ui/popups/UIPopup.tscn" id="1_582ge"] +[ext_resource type="Script" path="res://src/field/cutscenes/interaction_popup.gd" id="2_2fot7"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_cbdy6"] +radius = 32.0 + +[node name="InteractionPopup" instance=ExtResource("1_582ge")] +script = ExtResource("2_2fot7") +radius = 32 + +[node name="Sprite2D" parent="." index="0"] +offset = Vector2(0, -16) + +[node name="Area2D" type="Area2D" parent="." index="2"] +show_behind_parent = true +collision_layer = 0 +collision_mask = 4 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" index="0"] +shape = SubResource("CircleShape2D_cbdy6") + +[connection signal="area_entered" from="Area2D" to="." method="_on_area_entered"] +[connection signal="area_exited" from="Area2D" to="." method="_on_area_exited"] diff --git a/src/field/cutscenes/interaction_popup.gd b/src/field/cutscenes/interaction_popup.gd new file mode 100644 index 0000000..1e27693 --- /dev/null +++ b/src/field/cutscenes/interaction_popup.gd @@ -0,0 +1,34 @@ +@tool +extends UIPopup + +@export var radius: = 32: + set(value): + radius = value + + if not is_inside_tree(): + await ready + + _collision_shape.shape.radius = radius + +@onready var _area: = $Area2D as Area2D +@onready var _collision_shape: = $Area2D/CollisionShape2D as CollisionShape2D + + +func _ready() -> void: + super._ready() + + if not Engine.is_editor_hint(): + FieldEvents.input_paused.connect(_on_input_paused) + + +func _on_area_entered(_entered_area: Area2D) -> void: + _is_shown = true + + +func _on_area_exited(_exited_area: Area2D) -> void: + _is_shown = false + + +# Be sure to hide input when the player is not able to do anything (e.g. cutscenes). +func _on_input_paused(paused: bool) -> void: + _area.monitoring = !paused diff --git a/src/field/cutscenes/templates/conversations/conversation_template.gd b/src/field/cutscenes/templates/conversations/conversation_template.gd index a4ce8a9..a75af98 100644 --- a/src/field/cutscenes/templates/conversations/conversation_template.gd +++ b/src/field/cutscenes/templates/conversations/conversation_template.gd @@ -1,7 +1,6 @@ @tool -class_name InteractionTemplateConversation -extends Interaction +class_name InteractionTemplateConversation extends Interaction @export var timeline: DialogicTimeline diff --git a/src/field/cutscenes/templates/doors/door.tscn b/src/field/cutscenes/templates/doors/door.tscn index cf779cb..e9594ad 100644 --- a/src/field/cutscenes/templates/doors/door.tscn +++ b/src/field/cutscenes/templates/doors/door.tscn @@ -1,11 +1,10 @@ -[gd_scene load_steps=15 format=3 uid="uid://c14b8ageu2otv"] +[gd_scene load_steps=14 format=3 uid="uid://c14b8ageu2otv"] [ext_resource type="Texture2D" uid="uid://d2qfi5sncf72b" path="res://assets/terrain/town_tilemap.png" id="1_goth7"] [ext_resource type="Script" path="res://src/field/gameboard/lockable_door.gd" id="1_u45hv"] [ext_resource type="AudioStream" uid="uid://c5mcvei7x3nyd" path="res://assets/sfx/doors/sfx_movement_dooropen4.wav" id="2_ufclx"] [ext_resource type="AudioStream" uid="uid://dqhhqeihtm1q6" path="res://assets/sfx/doors/sfx_movement_dooropen3.wav" id="3_oftid"] [ext_resource type="AudioStream" uid="uid://ddaucqxv3tf7m" path="res://assets/sfx/doors/sfx_movement_dooropen1.wav" id="4_orhec"] -[ext_resource type="Script" path="res://src/field/cutscenes/templates/doors/interaction_template_locked_door.gd" id="5_61l11"] [ext_resource type="Texture2D" uid="uid://b71dt8n01lhd0" path="res://assets/gui/path_destination_marker.tres" id="7_2e200"] [sub_resource type="CircleShape2D" id="CircleShape2D_ge4hl"] @@ -202,12 +201,6 @@ shape = SubResource("CircleShape2D_ge4hl") [node name="LockedInteraction" type="Area2D" parent="GFX"] collision_layer = 18 collision_mask = 8 -script = ExtResource("5_61l11") -is_active = false -_anim = Object(AnimationPlayer,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","active":true,"deterministic":false,"reset_on_save":true,"root_node":NodePath(".."),"root_motion_track":NodePath(""),"audio_max_polyphony":32,"callback_mode_process":1,"callback_mode_method":0,"libraries":{ -"": SubResource("AnimationLibrary_3ff1q") -},"autoplay":"","playback_default_blend_time":0.0,"speed_scale":1.0,"movie_quit_on_finish":false,"blend_times":[],"script":null) - [node name="CollisionShape2D" type="CollisionShape2D" parent="GFX/LockedInteraction"] shape = SubResource("RectangleShape2D_mbh1i") diff --git a/src/field/ui/popups/UIPopup.tscn b/src/field/ui/popups/UIPopup.tscn new file mode 100644 index 0000000..1750eeb --- /dev/null +++ b/src/field/ui/popups/UIPopup.tscn @@ -0,0 +1,87 @@ +[gd_scene load_steps=8 format=3 uid="uid://dnd03as5e37he"] + +[ext_resource type="Script" path="res://src/field/ui/popups/ui_popup.gd" id="1_wg748"] +[ext_resource type="Texture2D" uid="uid://f2uyafsf3srw" path="res://assets/gui/emotes/emote__.png" id="2_j48km"] + +[sub_resource type="Animation" id="Animation_qeih3"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} + +[sub_resource type="Animation" id="Animation_mduwk"] +resource_name = "appear" +length = 0.3 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(0.5, 1), +"update": 0, +"values": [Vector2(1e-05, 1e-05), Vector2(1, 1)] +} + +[sub_resource type="Animation" id="Animation_t06fl"] +resource_name = "bounce" +length = 0.8 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1, 1.2), Vector2(1, 1), Vector2(1, 0.9), Vector2(1, 1)] +} + +[sub_resource type="Animation" id="Animation_veesw"] +resource_name = "disappear" +length = 0.2 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.2), +"transitions": PackedFloat32Array(2, 1), +"update": 0, +"values": [Vector2(1, 1), Vector2(1e-05, 1e-05)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_fggt1"] +_data = { +"RESET": SubResource("Animation_qeih3"), +"appear": SubResource("Animation_mduwk"), +"bounce": SubResource("Animation_t06fl"), +"disappear": SubResource("Animation_veesw") +} + +[node name="Popup" type="Node2D"] +script = ExtResource("1_wg748") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2_j48km") +offset = Vector2(0, -8) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_fggt1") +} diff --git a/src/field/ui/popups/ui_popup.gd b/src/field/ui/popups/ui_popup.gd new file mode 100644 index 0000000..c2e253a --- /dev/null +++ b/src/field/ui/popups/ui_popup.gd @@ -0,0 +1,75 @@ +@tool +class_name UIPopup extends Node2D + +enum IconTypes { EMPTY, EXCLAMATION, QUESTION} + +# The current state of a popup. +enum States { HIDDEN, SHOWN, HIDING, SHOWING} + +const Emotes: = { + IconTypes.EMPTY: preload("res://assets/gui/emotes/emote__.png"), + IconTypes.EXCLAMATION: preload("res://assets/gui/emotes/emote_exclamations.png"), + IconTypes.QUESTION: preload("res://assets/gui/emotes/emote_question.png"), +} + +@export var emote: IconTypes: + set(value): + emote = value + + if not is_inside_tree(): + await ready + + _sprite.texture = Emotes.get(emote, Emotes[IconTypes.EMPTY]) + +# The target state of the popup. Setting it to true or false will cause a change in behaviour. +# True if the popup should be shown or false if the popup should be hidden. +# Note that this shows the TARGET state of the popup, so _is_shown may be false even while the +# popup is appearing. +var _is_shown: = false: + set(value): + _is_shown = value + if _is_shown and _state == States.HIDDEN: + _anim.play("appear") + _state = States.SHOWING + +# Track what is currently happening to the popup. +var _state: = States.HIDDEN + +@onready var _anim: = $AnimationPlayer as AnimationPlayer +@onready var _sprite: = $Sprite2D as Sprite2D + + +func _ready() -> void: + if not Engine.is_editor_hint(): + _sprite.scale = Vector2.ZERO + _anim.animation_finished.connect(_on_animation_finished) + + +func _unhandled_input(event: InputEvent) -> void: + if event.is_action_released("ui_focus_next"): + _is_shown = !_is_shown + + +# An animation has finished, so we may want to change the popup's behaviour depending on whether or +# not it has been flagged for a state change through _is_shown. +func _on_animation_finished(_anim_name: String) -> void: + # The popup has should be shown. If the popup is hiding or is hidden, go ahead and have it + # appear. Otherwise, the popup can play a default bouncy animation to draw the player's eye. + if _is_shown: + match _state: + States.HIDING, States.HIDDEN: + _anim.play("appear") + _state = States.SHOWING + _: + _anim.play("bounce") + _state = States.SHOWN + + # The popup should be hidden. If it has just appeared, cause it to disappear. Otherwise just + # flag it as hidden. + else: + match _state: + States.SHOWING, States.SHOWN: + _anim.play("disappear") + _state = States.HIDING + _: + _state = States.HIDDEN diff --git a/src/main.tscn b/src/main.tscn index 2cef34c..da612c2 100644 --- a/src/main.tscn +++ b/src/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=39 format=3 uid="uid://p01fb6nvi144"] +[gd_scene load_steps=53 format=3 uid="uid://p01fb6nvi144"] [ext_resource type="Script" path="res://src/field/field.gd" id="2_bkxev"] [ext_resource type="Script" path="res://src/field/field_cursor.gd" id="5_3guor"] @@ -12,6 +12,7 @@ [ext_resource type="Texture2D" uid="uid://b71dt8n01lhd0" path="res://assets/gui/path_destination_marker.tres" id="13_osl4o"] [ext_resource type="Texture2D" uid="uid://ber3qsogrcx52" path="res://assets/characters/apothecary.atlastex" id="13_tekkh"] [ext_resource type="Script" path="res://src/field/player_path_destination_marker.gd" id="14_0j4ru"] +[ext_resource type="Resource" path="res://data/maps/town/warrior.dtl" id="14_32khq"] [ext_resource type="PackedScene" uid="uid://se1wnxu5svgj" path="res://data/field/characters/knight_gfx.tscn" id="14_av6f5"] [ext_resource type="Script" path="res://src/field/cutscenes/templates/conversations/conversation_template.gd" id="14_b3y71"] [ext_resource type="Resource" path="res://data/maps/town/runner.dtl" id="16_ybo02"] @@ -21,18 +22,26 @@ [ext_resource type="Script" path="res://src/field/gameboard/debug_map_boundaries.gd" id="18_cqtg7"] [ext_resource type="PackedScene" uid="uid://ccm8tsjysf8b5" path="res://data/field/characters/wizard_gfx.tscn" id="19_ius2d"] [ext_resource type="Script" path="res://addons/dialogic/Modules/Text/node_name_label.gd" id="19_lpxfg"] +[ext_resource type="Resource" path="res://data/maps/town/thief.dtl" id="19_s5udr"] [ext_resource type="PackedScene" uid="uid://oot0x5n44b2r" path="res://src/field/cutscenes/Interaction.tscn" id="19_sa6jd"] [ext_resource type="Script" path="res://addons/dialogic/Modules/Text/node_dialog_text.gd" id="20_g8d34"] [ext_resource type="Script" path="res://src/field/ui/dialogue_window.gd" id="20_lk3dv"] +[ext_resource type="Resource" path="res://data/maps/town/monk.dtl" id="21_ap4qa"] [ext_resource type="Script" path="res://addons/dialogic/Modules/Character/node_portrait_container.gd" id="21_f53lt"] [ext_resource type="FontFile" uid="uid://cfhyd5hmym1s4" path="res://assets/gui/font/Kenney Pixel.ttf" id="21_r13nn"] [ext_resource type="Resource" path="res://data/maps/town/smith.dtl" id="22_dko83"] [ext_resource type="Script" path="res://data/maps/town/fan_interaction.gd" id="24_u4cmv"] +[ext_resource type="Resource" path="res://data/maps/town/wizard.dtl" id="25_8uprj"] [ext_resource type="Resource" path="res://data/maps/town/fan_of_four.dtl" id="25_dmuyg"] [ext_resource type="PackedScene" uid="uid://c14b8ageu2otv" path="res://src/field/cutscenes/templates/doors/door.tscn" id="26_kf5ye"] [ext_resource type="Script" path="res://src/field/gamepieces/controllers/gamepiece_controller.gd" id="26_p8jrd"] [ext_resource type="PackedScene" uid="uid://ceefih4ls7dcn" path="res://src/field/cutscenes/templates/keys/key.tscn" id="29_gxq7u"] +[ext_resource type="Script" path="res://data/maps/town/strange_tree_interaction.gd" id="31_y2el4"] +[ext_resource type="Resource" path="res://data/maps/town/strange_tree.dtl" id="32_m0jee"] +[ext_resource type="Texture2D" uid="uid://d2qfi5sncf72b" path="res://assets/terrain/town_tilemap.png" id="33_ofo2l"] +[ext_resource type="PackedScene" uid="uid://cubp81mykng3h" path="res://src/field/cutscenes/InteractionPopup.tscn" id="34_qs25x"] [ext_resource type="Script" path="res://src/field/ui/ui_inventory.gd" id="34_tk01t"] +[ext_resource type="Resource" path="res://data/maps/town/sign.dtl" id="35_gv62s"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_orie5"] resource_name = "Overlay" @@ -47,12 +56,88 @@ sources/0 = SubResource("TileSetAtlasSource_orie5") [sub_resource type="RectangleShape2D" id="RectangleShape2D_nn0hs"] size = Vector2(16, 16) -[sub_resource type="CircleShape2D" id="CircleShape2D_02nj2"] -radius = 4.0 - [sub_resource type="CircleShape2D" id="CircleShape2D_2lbg3"] radius = 4.0 +[sub_resource type="RectangleShape2D" id="RectangleShape2D_0ughy"] +size = Vector2(15, 15) + +[sub_resource type="Animation" id="Animation_y8463"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("TileMap:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Color(1, 1, 1, 1)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("PathBlocker/CollisionShape2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + +[sub_resource type="Animation" id="Animation_0kxfj"] +resource_name = "disappear" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("TileMap:modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(2.37841, 1), +"update": 0, +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("PathBlocker/CollisionShape2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [false, true] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_37hna"] +_data = { +"RESET": SubResource("Animation_y8463"), +"disappear": SubResource("Animation_0kxfj") +} + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_s5jqb"] +texture = ExtResource("33_ofo2l") +separation = Vector2i(1, 1) +8:0/0 = 0 +7:0/0 = 0 +6:0/0 = 0 +6:1/0 = 0 +6:2/0 = 0 +7:2/0 = 0 +7:1/0 = 0 +8:1/0 = 0 +8:2/0 = 0 + +[sub_resource type="TileSet" id="TileSet_tinid"] +sources/0 = SubResource("TileSetAtlasSource_s5jqb") + [node name="Gameboard" type="Node2D" node_paths=PackedStringArray("focused_game_piece")] scale = Vector2(5, 5) script = ExtResource("2_bkxev") @@ -123,6 +208,10 @@ metadata/_edit_group_ = true [node name="KnightGFX" parent="Terrain/Gamepieces/MoodyHero" instance=ExtResource("14_av6f5")] +[node name="Interaction" parent="Terrain/Gamepieces/MoodyHero" instance=ExtResource("19_sa6jd")] +script = ExtResource("14_b3y71") +timeline = ExtResource("14_32khq") + [node name="Runner" parent="Terrain/Gamepieces" instance=ExtResource("11_yntrj")] position = Vector2(296, 184) gameboard = ExtResource("6_kd8tv") @@ -131,16 +220,10 @@ metadata/_edit_group_ = true [node name="GenericCharacterAnimation" parent="Terrain/Gamepieces/Runner" instance=ExtResource("12_n5rm1")] -[node name="Interaction" type="Area2D" parent="Terrain/Gamepieces/Runner"] -collision_layer = 16 -collision_mask = 8 +[node name="Interaction" parent="Terrain/Gamepieces/Runner" instance=ExtResource("19_sa6jd")] script = ExtResource("14_b3y71") timeline = ExtResource("16_ybo02") -[node name="CollisionShape2D" type="CollisionShape2D" parent="Terrain/Gamepieces/Runner/Interaction"] -shape = SubResource("CircleShape2D_02nj2") -debug_color = Color(1, 0.929412, 0.631373, 0.419608) - [node name="LoopAI" type="Node2D" parent="Terrain/Gamepieces/Runner" node_paths=PackedStringArray("move_path")] script = ExtResource("12_glwd5") move_path = NodePath("MovePath") @@ -162,6 +245,10 @@ metadata/_edit_group_ = true [node name="ThiefGFX" parent="Terrain/Gamepieces/Thief" instance=ExtResource("17_sieyv")] +[node name="Interaction" parent="Terrain/Gamepieces/Thief" instance=ExtResource("19_sa6jd")] +script = ExtResource("14_b3y71") +timeline = ExtResource("19_s5udr") + [node name="Monk" parent="Terrain/Gamepieces" instance=ExtResource("11_yntrj")] position = Vector2(344, 8) gameboard = ExtResource("6_kd8tv") @@ -170,6 +257,10 @@ metadata/_edit_group_ = true [node name="MonkGFX" parent="Terrain/Gamepieces/Monk" instance=ExtResource("17_qgtho")] +[node name="Interaction" parent="Terrain/Gamepieces/Monk" instance=ExtResource("19_sa6jd")] +script = ExtResource("14_b3y71") +timeline = ExtResource("21_ap4qa") + [node name="Smith" parent="Terrain/Gamepieces" instance=ExtResource("11_yntrj")] position = Vector2(136, 88) gameboard = ExtResource("6_kd8tv") @@ -182,6 +273,9 @@ metadata/_edit_group_ = true script = ExtResource("14_b3y71") timeline = ExtResource("22_dko83") +[node name="InteractionPopup" parent="Terrain/Gamepieces/Smith/Interaction" instance=ExtResource("34_qs25x")] +position = Vector2(0, -7) + [node name="Wizard" parent="Terrain/Gamepieces" instance=ExtResource("11_yntrj")] position = Vector2(344, 72) gameboard = ExtResource("6_kd8tv") @@ -190,6 +284,10 @@ metadata/_edit_group_ = true [node name="WizardGFX" parent="Terrain/Gamepieces/Wizard" instance=ExtResource("19_ius2d")] +[node name="Interaction" parent="Terrain/Gamepieces/Wizard" instance=ExtResource("19_sa6jd")] +script = ExtResource("14_b3y71") +timeline = ExtResource("25_8uprj") + [node name="AdoringFan" parent="Terrain/Gamepieces" instance=ExtResource("11_yntrj")] position = Vector2(280, 104) gameboard = ExtResource("6_kd8tv") @@ -220,6 +318,42 @@ position = Vector2(120, 176) [node name="Key" parent="Terrain/Gamepieces" instance=ExtResource("29_gxq7u")] position = Vector2(40, 24) +[node name="StrangeTreeInteraction" parent="Terrain" instance=ExtResource("19_sa6jd")] +position = Vector2(56, 72) +script = ExtResource("31_y2el4") +timeline = ExtResource("32_m0jee") + +[node name="PathBlocker" type="Area2D" parent="Terrain/StrangeTreeInteraction"] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Terrain/StrangeTreeInteraction/PathBlocker"] +position = Vector2(-16, 16) +shape = SubResource("RectangleShape2D_0ughy") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Terrain/StrangeTreeInteraction"] +libraries = { +"": SubResource("AnimationLibrary_37hna") +} + +[node name="TileMap" type="TileMap" parent="Terrain/StrangeTreeInteraction"] +position = Vector2(-8, -8) +tile_set = SubResource("TileSet_tinid") +format = 2 +layer_0/tile_data = PackedInt32Array(65532, 458752, 1, 65533, 458752, 1, -3, 458752, 1, -65539, 458752, 1, -4, 458752, 1, -65540, 458752, 1, 131069, 458752, 1, -2, 458752, 1, 65534, 458752, 1, 131070, 458752, 1, 196606, 524288, 2, 131071, 524288, 2, 65535, 524288, 0, -1, 524288, 1, -65538, 524288, 0) + +[node name="InteractionPopup" parent="Terrain/StrangeTreeInteraction" instance=ExtResource("34_qs25x")] +scale = Vector2(1, 1) +emote = 2 + +[node name="SignInteraction" parent="Terrain" instance=ExtResource("19_sa6jd")] +position = Vector2(152, 168) +script = ExtResource("14_b3y71") +timeline = ExtResource("35_gv62s") + +[node name="InteractionPopup" parent="Terrain/SignInteraction" instance=ExtResource("34_qs25x")] +emote = 1 + [node name="MapBoundaries" type="Node2D" parent="."] script = ExtResource("18_cqtg7") gameboard = ExtResource("6_kd8tv") @@ -250,6 +384,7 @@ metadata/_edit_group_ = true metadata/_edit_lock_ = true [node name="DialogueLayout" type="Control" parent="UI"] +visible = false layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 -- GitLab