diff --git a/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd b/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd index ca9e3ee4..f58fcda0 100644 --- a/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd +++ b/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd @@ -395,48 +395,34 @@ func _is_angle_in_interval( angle = 360 var start_angle = wrapi(direction_angle.angle_start, 0, 360) var angle_area = direction_angle.angle_size - var end_angle = wrapi(direction_angle.angle_start + angle_area, 0, 360) + var end_angle = direction_angle.angle_start + angle_area + if start_angle >= 0 and end_angle == 0: + end_angle = 360 - # First we want to test if angle is in upper part of the clock. - # If it is, we add 180 to all angles so that we test in lower part of the - # clock, so we avoid messing with calculations wrapping around 360° and 0°. - if _angle_is_between_270_to_90(angle): - return _angle_is_between( - angle + 180, - start_angle + 180, - start_angle + angle_area + 180 - ) - else: - return _angle_is_between(angle, start_angle, end_angle) + return _angle_is_between(angle, start_angle, end_angle) -# Returns true if angle is in upper part of trigonometric circle -# ie. between 0 and PI -# ie. between 270° and 90° -# ie. between 9 o'clock and 3 o'clock +# Returns true if angle is between start angle and end angle. # # #### Parameters # -# - angle: the angle in degrees -func _angle_is_between_270_to_90(angle: float) -> bool: - return (angle >= 270 and angle <= 360) or (angle >= 0 and angle <= 90) - - -# Returns true if angle is between start angle and end angle. All angle values -# will clamped between 0 and 360 degrees. -# -# #### Parameters -# -# - angle: the angle in degrees -# - start_angle: the start value of the angle interval -# - end_angle: the end value of the angle interval +# - p_angle: the angle in degrees +# - p_start_angle: the start value of the angle interval +# - p_end_angle: the end value of the angle interval func _angle_is_between( - angle: float, - start_angle: float, - end_angle: float + p_angle: float, + p_start_angle: float, + p_end_angle: float ) -> bool: - return wrapi(angle, 0, 360) >= wrapi(start_angle, 0, 360) \ - and wrapi(angle, 0, 360) <= wrapi(end_angle, 0, 360) + var angle = wrapi(p_angle, 0, 360) + var start_angle = wrapi(p_start_angle, 0, 360) + var end_angle = wrapi(p_end_angle, 0, 360) + if start_angle >= 0 and end_angle == 0: + end_angle = 360 + if end_angle < start_angle: + end_angle = p_end_angle + + return angle >= start_angle and angle <= end_angle # Sets character's angle and plays according animation. diff --git a/game/characters/mark/mark.tscn b/game/characters/mark/mark.tscn index c71c9f41..4cc8dadb 100644 --- a/game/characters/mark/mark.tscn +++ b/game/characters/mark/mark.tscn @@ -9,191 +9,191 @@ [ext_resource path="res://game/characters/mark/png/mark_talk_right.png" type="Texture" id=7] [sub_resource type="AtlasTexture" id=1] -atlas = ExtResource( 5 ) -region = Rect2( 0, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 120, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=2] -atlas = ExtResource( 5 ) -region = Rect2( 24, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 216, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=3] -atlas = ExtResource( 5 ) -region = Rect2( 48, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 240, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=4] atlas = ExtResource( 4 ) -region = Rect2( 72, 0, 24, 70 ) +region = Rect2( 264, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=5] -atlas = ExtResource( 7 ) -region = Rect2( 0, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 288, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=6] -atlas = ExtResource( 7 ) -region = Rect2( 24, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 312, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=7] -atlas = ExtResource( 7 ) -region = Rect2( 48, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 336, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=8] -atlas = ExtResource( 7 ) -region = Rect2( 72, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 360, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=9] -atlas = ExtResource( 7 ) -region = Rect2( 96, 0, 24, 70 ) +atlas = ExtResource( 4 ) +region = Rect2( 384, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=10] -atlas = ExtResource( 6 ) +atlas = ExtResource( 4 ) region = Rect2( 0, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=11] -atlas = ExtResource( 6 ) +atlas = ExtResource( 4 ) region = Rect2( 24, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=12] atlas = ExtResource( 4 ) -region = Rect2( 120, 0, 24, 70 ) +region = Rect2( 144, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=13] atlas = ExtResource( 4 ) -region = Rect2( 336, 0, 24, 70 ) +region = Rect2( 168, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=14] atlas = ExtResource( 4 ) -region = Rect2( 360, 0, 24, 70 ) +region = Rect2( 192, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=15] atlas = ExtResource( 4 ) -region = Rect2( 384, 0, 24, 70 ) +region = Rect2( 96, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=16] atlas = ExtResource( 4 ) -region = Rect2( 144, 0, 24, 70 ) +region = Rect2( 48, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=17] -atlas = ExtResource( 4 ) -region = Rect2( 168, 0, 24, 70 ) +atlas = ExtResource( 2 ) +region = Rect2( 0, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=18] -atlas = ExtResource( 4 ) -region = Rect2( 192, 0, 24, 70 ) +atlas = ExtResource( 2 ) +region = Rect2( 24, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=19] -atlas = ExtResource( 4 ) -region = Rect2( 216, 0, 24, 70 ) +atlas = ExtResource( 2 ) +region = Rect2( 48, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=20] -atlas = ExtResource( 4 ) -region = Rect2( 240, 0, 24, 70 ) +atlas = ExtResource( 5 ) +region = Rect2( 0, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=21] -atlas = ExtResource( 4 ) -region = Rect2( 264, 0, 24, 70 ) +atlas = ExtResource( 5 ) +region = Rect2( 24, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=22] -atlas = ExtResource( 4 ) -region = Rect2( 288, 0, 24, 70 ) +atlas = ExtResource( 5 ) +region = Rect2( 48, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=23] -atlas = ExtResource( 4 ) -region = Rect2( 312, 0, 24, 70 ) +atlas = ExtResource( 6 ) +region = Rect2( 0, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=24] -atlas = ExtResource( 4 ) -region = Rect2( 48, 0, 24, 70 ) +atlas = ExtResource( 6 ) +region = Rect2( 24, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=25] atlas = ExtResource( 4 ) -region = Rect2( 24, 0, 24, 70 ) +region = Rect2( 72, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=26] -atlas = ExtResource( 2 ) +atlas = ExtResource( 7 ) region = Rect2( 0, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=27] -atlas = ExtResource( 2 ) +atlas = ExtResource( 7 ) region = Rect2( 24, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=28] -atlas = ExtResource( 2 ) +atlas = ExtResource( 7 ) region = Rect2( 48, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=29] -atlas = ExtResource( 4 ) -region = Rect2( 0, 0, 24, 70 ) +atlas = ExtResource( 7 ) +region = Rect2( 72, 0, 24, 70 ) [sub_resource type="AtlasTexture" id=30] -atlas = ExtResource( 4 ) +atlas = ExtResource( 7 ) region = Rect2( 96, 0, 24, 70 ) [sub_resource type="SpriteFrames" id=31] animations = [ { -"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ) ], -"loop": true, -"name": "speak_down_right", -"speed": 6.0 -}, { -"frames": [ SubResource( 4 ) ], -"loop": true, -"name": "idle_up", -"speed": 5.0 -}, { -"frames": [ SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ], -"loop": true, -"name": "speak_right", -"speed": 5.0 -}, { -"frames": [ SubResource( 10 ), SubResource( 11 ), SubResource( 10 ), SubResource( 11 ), SubResource( 11 ) ], -"loop": true, -"name": "speak_up", -"speed": 3.0 -}, { -"frames": [ SubResource( 12 ) ], +"frames": [ SubResource( 1 ) ], "loop": true, "name": "idle_down_left", "speed": 5.0 }, { -"frames": [ SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 14 ) ], -"loop": true, -"name": "walk_up", -"speed": 6.0 -}, { -"frames": [ SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 17 ) ], -"loop": true, -"name": "walk_down", -"speed": 6.0 -}, { -"frames": [ SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ) ], +"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], "loop": true, "name": "walk_right", "speed": 6.0 }, { -"frames": [ SubResource( 24 ) ], +"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 8 ) ], "loop": true, -"name": "idle_right", -"speed": 5.0 -}, { -"frames": [ SubResource( 25 ) ], -"loop": true, -"name": "idle_down_right", -"speed": 5.0 -}, { -"frames": [ SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 27 ), SubResource( 28 ) ], -"loop": true, -"name": "speak_down", +"name": "walk_up", "speed": 6.0 }, { -"frames": [ SubResource( 29 ) ], +"frames": [ SubResource( 10 ) ], "loop": true, "name": "idle_down", "speed": 5.0 }, { -"frames": [ SubResource( 30 ) ], +"frames": [ SubResource( 11 ) ], +"loop": true, +"name": "idle_down_right", +"speed": 5.0 +}, { +"frames": [ SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 13 ) ], +"loop": true, +"name": "walk_down", +"speed": 6.0 +}, { +"frames": [ SubResource( 15 ) ], "loop": true, "name": "idle_left", "speed": 5.0 +}, { +"frames": [ SubResource( 16 ) ], +"loop": true, +"name": "idle_right", +"speed": 5.0 +}, { +"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 18 ), SubResource( 19 ) ], +"loop": true, +"name": "speak_down", +"speed": 6.0 +}, { +"frames": [ SubResource( 20 ), SubResource( 21 ), SubResource( 22 ) ], +"loop": true, +"name": "speak_down_right", +"speed": 6.0 +}, { +"frames": [ SubResource( 23 ), SubResource( 24 ), SubResource( 23 ), SubResource( 24 ), SubResource( 24 ) ], +"loop": true, +"name": "speak_up", +"speed": 3.0 +}, { +"frames": [ SubResource( 25 ) ], +"loop": true, +"name": "idle_up", +"speed": 5.0 +}, { +"frames": [ SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ], +"loop": true, +"name": "speak_right", +"speed": 5.0 } ] [sub_resource type="CapsuleShape2D" id=32] diff --git a/game/characters/mark2dir/mark.esc b/game/characters/mark2dir/mark.esc new file mode 100644 index 00000000..5638a54a --- /dev/null +++ b/game/characters/mark2dir/mark.esc @@ -0,0 +1,3 @@ +:look + +say player "That's a-me, Mark-io." diff --git a/game/characters/mark2dir/mark2dir.tscn b/game/characters/mark2dir/mark2dir.tscn new file mode 100644 index 00000000..a5e11298 --- /dev/null +++ b/game/characters/mark2dir/mark2dir.tscn @@ -0,0 +1,232 @@ +[gd_scene load_steps=40 format=2] + +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_player.gd" type="Script" id=1] +[ext_resource path="res://game/characters/mark/png/mark_talk_down.png" type="Texture" id=2] +[ext_resource path="res://game/characters/mark2dir/mark_animations.tres" type="Resource" id=3] +[ext_resource path="res://game/characters/mark/png/mark.png" type="Texture" id=4] +[ext_resource path="res://game/characters/mark/png/mark_talk_down_right.png" type="Texture" id=5] +[ext_resource path="res://game/characters/mark/png/mark_talk_up.png" type="Texture" id=6] +[ext_resource path="res://game/characters/mark/png/mark_talk_right.png" type="Texture" id=7] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 4 ) +region = Rect2( 120, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 4 ) +region = Rect2( 216, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 4 ) +region = Rect2( 240, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 4 ) +region = Rect2( 264, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 4 ) +region = Rect2( 288, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=6] +atlas = ExtResource( 4 ) +region = Rect2( 312, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=7] +atlas = ExtResource( 4 ) +region = Rect2( 336, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=8] +atlas = ExtResource( 4 ) +region = Rect2( 360, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=9] +atlas = ExtResource( 4 ) +region = Rect2( 384, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=10] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=11] +atlas = ExtResource( 4 ) +region = Rect2( 24, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=12] +atlas = ExtResource( 4 ) +region = Rect2( 144, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=13] +atlas = ExtResource( 4 ) +region = Rect2( 168, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=14] +atlas = ExtResource( 4 ) +region = Rect2( 192, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=15] +atlas = ExtResource( 4 ) +region = Rect2( 96, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=16] +atlas = ExtResource( 4 ) +region = Rect2( 48, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=17] +atlas = ExtResource( 2 ) +region = Rect2( 0, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=18] +atlas = ExtResource( 2 ) +region = Rect2( 24, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=19] +atlas = ExtResource( 2 ) +region = Rect2( 48, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=20] +atlas = ExtResource( 5 ) +region = Rect2( 0, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=21] +atlas = ExtResource( 5 ) +region = Rect2( 24, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=22] +atlas = ExtResource( 5 ) +region = Rect2( 48, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=23] +atlas = ExtResource( 6 ) +region = Rect2( 0, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=24] +atlas = ExtResource( 6 ) +region = Rect2( 24, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=25] +atlas = ExtResource( 4 ) +region = Rect2( 72, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=26] +atlas = ExtResource( 7 ) +region = Rect2( 0, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=27] +atlas = ExtResource( 7 ) +region = Rect2( 24, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=28] +atlas = ExtResource( 7 ) +region = Rect2( 48, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=29] +atlas = ExtResource( 7 ) +region = Rect2( 72, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=30] +atlas = ExtResource( 7 ) +region = Rect2( 96, 0, 24, 70 ) + +[sub_resource type="SpriteFrames" id=31] +animations = [ { +"frames": [ SubResource( 1 ) ], +"loop": true, +"name": "idle_down_left", +"speed": 5.0 +}, { +"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], +"loop": true, +"name": "walk_right", +"speed": 6.0 +}, { +"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 8 ) ], +"loop": true, +"name": "walk_up", +"speed": 6.0 +}, { +"frames": [ SubResource( 10 ) ], +"loop": true, +"name": "idle_down", +"speed": 5.0 +}, { +"frames": [ SubResource( 11 ) ], +"loop": true, +"name": "idle_down_right", +"speed": 5.0 +}, { +"frames": [ SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 13 ) ], +"loop": true, +"name": "walk_down", +"speed": 6.0 +}, { +"frames": [ SubResource( 15 ) ], +"loop": true, +"name": "idle_left", +"speed": 5.0 +}, { +"frames": [ SubResource( 16 ) ], +"loop": true, +"name": "idle_right", +"speed": 5.0 +}, { +"frames": [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 18 ), SubResource( 19 ) ], +"loop": true, +"name": "speak_down", +"speed": 6.0 +}, { +"frames": [ SubResource( 20 ), SubResource( 21 ), SubResource( 22 ) ], +"loop": true, +"name": "speak_down_right", +"speed": 6.0 +}, { +"frames": [ SubResource( 23 ), SubResource( 24 ), SubResource( 23 ), SubResource( 24 ), SubResource( 24 ) ], +"loop": true, +"name": "speak_up", +"speed": 3.0 +}, { +"frames": [ SubResource( 25 ) ], +"loop": true, +"name": "idle_up", +"speed": 5.0 +}, { +"frames": [ SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ], +"loop": true, +"name": "speak_right", +"speed": 5.0 +} ] + +[sub_resource type="CapsuleShape2D" id=32] +radius = 38.2347 +height = 217.78 + +[node name="mark" type="Area2D"] +pause_mode = 1 +script = ExtResource( 1 ) +global_id = "player" +esc_script = "res://game/characters/mark2dir/mark.esc" +is_movable = true +tooltip_name = "Me" +dialog_color = Color( 1, 1, 1, 1 ) +selectable = true +animations = ExtResource( 3 ) + +[node name="sprite" type="AnimatedSprite" parent="."] +position = Vector2( 0, -140.938 ) +scale = Vector2( 4, 4 ) +frames = SubResource( 31 ) +animation = "idle_down" + +[node name="collision" type="CollisionShape2D" parent="."] +position = Vector2( 0.455139, -138.362 ) +shape = SubResource( 32 ) + +[node name="debug" type="Label" parent="."] +margin_right = 40.0 +margin_bottom = 14.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="dialog_position" type="Position2D" parent="."] +position = Vector2( 0, -320 ) diff --git a/game/characters/mark2dir/mark_animations.tres b/game/characters/mark2dir/mark_animations.tres new file mode 100644 index 00000000..ee22043a --- /dev/null +++ b/game/characters/mark2dir/mark_animations.tres @@ -0,0 +1,52 @@ +[gd_resource type="Resource" load_steps=12 format=2] + +[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" type="Script" id=1] +[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" type="Script" id=2] +[ext_resource path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" type="Script" id=3] + +[sub_resource type="Resource" id=1] +script = ExtResource( 2 ) +angle_start = 0 +angle_size = 180 + +[sub_resource type="Resource" id=2] +script = ExtResource( 2 ) +angle_start = 180 +angle_size = 180 + +[sub_resource type="Resource" id=3] +script = ExtResource( 3 ) +animation = "walk_right" +mirrored = false + +[sub_resource type="Resource" id=4] +script = ExtResource( 3 ) +animation = "walk_right" +mirrored = true + +[sub_resource type="Resource" id=5] +script = ExtResource( 3 ) +animation = "idle_right" +mirrored = false + +[sub_resource type="Resource" id=6] +script = ExtResource( 3 ) +animation = "idle_left" +mirrored = false + +[sub_resource type="Resource" id=7] +script = ExtResource( 3 ) +animation = "speak_right" +mirrored = false + +[sub_resource type="Resource" id=8] +script = ExtResource( 3 ) +animation = "speak_right" +mirrored = true + +[resource] +script = ExtResource( 1 ) +dir_angles = [ SubResource( 1 ), SubResource( 2 ) ] +directions = [ SubResource( 3 ), SubResource( 4 ) ] +idles = [ SubResource( 5 ), SubResource( 6 ) ] +speaks = [ SubResource( 7 ), SubResource( 8 ) ] diff --git a/game/characters/mark2dir/mark_talk.tscn b/game/characters/mark2dir/mark_talk.tscn new file mode 100644 index 00000000..6f37c920 --- /dev/null +++ b/game/characters/mark2dir/mark_talk.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://game/characters/mark/png/mark_talk_right.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 24, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 48, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 72, 0, 24, 70 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 1 ) +region = Rect2( 96, 0, 24, 70 ) + +[sub_resource type="SpriteFrames" id=6] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ], +"loop": true, +"name": "default", +"speed": 5.0 +} ] + +[node name="AnimatedSprite" type="AnimatedSprite"] +frames = SubResource( 6 ) diff --git a/game/characters/mark2dir/png/mark.png b/game/characters/mark2dir/png/mark.png new file mode 100644 index 00000000..91cacd24 Binary files /dev/null and b/game/characters/mark2dir/png/mark.png differ diff --git a/game/characters/mark2dir/png/mark_talk_down.png b/game/characters/mark2dir/png/mark_talk_down.png new file mode 100644 index 00000000..85a7ba2f Binary files /dev/null and b/game/characters/mark2dir/png/mark_talk_down.png differ diff --git a/game/characters/mark2dir/png/mark_talk_down_right.png b/game/characters/mark2dir/png/mark_talk_down_right.png new file mode 100644 index 00000000..980d0abb Binary files /dev/null and b/game/characters/mark2dir/png/mark_talk_down_right.png differ diff --git a/game/characters/mark2dir/png/mark_talk_right.png b/game/characters/mark2dir/png/mark_talk_right.png new file mode 100644 index 00000000..15937f21 Binary files /dev/null and b/game/characters/mark2dir/png/mark_talk_right.png differ diff --git a/game/characters/mark2dir/png/mark_talk_up.png b/game/characters/mark2dir/png/mark_talk_up.png new file mode 100644 index 00000000..1d85e560 Binary files /dev/null and b/game/characters/mark2dir/png/mark_talk_up.png differ diff --git a/game/characters/mark2dir/sfx/footstep_concrete_000.ogg b/game/characters/mark2dir/sfx/footstep_concrete_000.ogg new file mode 100644 index 00000000..163cc564 Binary files /dev/null and b/game/characters/mark2dir/sfx/footstep_concrete_000.ogg differ diff --git a/game/rooms/room15/room15.tscn b/game/rooms/room15/room15.tscn index ae033586..492fe7af 100644 --- a/game/rooms/room15/room15.tscn +++ b/game/rooms/room15/room15.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=1] [ext_resource path="res://game/rooms/room15/background.tscn" type="PackedScene" id=2] [ext_resource path="res://game/fonts/caslonantique.tres" type="DynamicFont" id=3] -[ext_resource path="res://game/characters/mark/mark.tscn" type="PackedScene" id=4] +[ext_resource path="res://game/characters/mark2dir/mark2dir.tscn" type="PackedScene" id=4] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7]