Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
[gd_scene format=3 uid="uid://nt43v1uyni2b"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bbee4w8xyxiii" path="res://entities/magus/scripts/magus.gd" id="1_0jt1g"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://dv7ukgk6k5kv" path="res://entities/magus/sprites/magus_sprite_frames.tres" id="1_onv7e"]
|
||||
[ext_resource type="Script" uid="uid://bp4pd1ek1cqnn" path="res://shared/helpers/dialogue_marker.gd" id="2_0jt1g"]
|
||||
|
||||
[node name="Magus" type="Node2D" unique_id=629939891]
|
||||
scale = Vector2(5, 5)
|
||||
script = ExtResource("1_0jt1g")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1954953550]
|
||||
sprite_frames = ExtResource("1_onv7e")
|
||||
autoplay = "default"
|
||||
offset = Vector2(0, -16)
|
||||
|
||||
[node name="DialogueMarker" type="Marker2D" parent="." unique_id=529368210]
|
||||
position = Vector2(0, -36.8)
|
||||
script = ExtResource("2_0jt1g")
|
||||
color = Color(1, 0, 1, 1)
|
||||
character_name = "Elwood"
|
||||
@@ -0,0 +1,25 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Events.character_started_talking.connect(_on_character_started_talking)
|
||||
Events.character_finished_talking.connect(_on_character_finished_talking)
|
||||
|
||||
|
||||
#region Signals
|
||||
|
||||
|
||||
func _on_character_started_talking(character_name: String) -> void:
|
||||
if character_name == "Elwood":
|
||||
$AnimatedSprite2D.play("talk")
|
||||
|
||||
|
||||
func _on_character_finished_talking(character_name: String) -> void:
|
||||
if character_name == "Elwood":
|
||||
$AnimatedSprite2D.play("default")
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -0,0 +1 @@
|
||||
uid://bbee4w8xyxiii
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cw70qdoiwnhir"
|
||||
path="res://.godot/imported/magus.png-accec5791145174bb40e684340ba2d42.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/magus/sprites/magus.png"
|
||||
dest_files=["res://.godot/imported/magus.png-accec5791145174bb40e684340ba2d42.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
@@ -0,0 +1,44 @@
|
||||
[gd_resource type="SpriteFrames" format=3 uid="uid://dv7ukgk6k5kv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cw70qdoiwnhir" path="res://entities/magus/sprites/magus.png" id="1_8aab7"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_onv7e"]
|
||||
atlas = ExtResource("1_8aab7")
|
||||
region = Rect2(319, 6, 30, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0jt1g"]
|
||||
atlas = ExtResource("1_8aab7")
|
||||
region = Rect2(351, 7, 30, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u2jd0"]
|
||||
atlas = ExtResource("1_8aab7")
|
||||
region = Rect2(670, 8, 19, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_no6fi"]
|
||||
atlas = ExtResource("1_8aab7")
|
||||
region = Rect2(692, 8, 19, 32)
|
||||
|
||||
[resource]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_onv7e")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0jt1g")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"default",
|
||||
"speed": 2.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_u2jd0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_no6fi")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"talk",
|
||||
"speed": 5.0
|
||||
}]
|
||||
Reference in New Issue
Block a user