feat: Keep current animations resource (#459)

Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
Dennis Ploeger
2021-11-23 22:19:24 +01:00
committed by GitHub
parent 4f07278a73
commit 7963f03087
13 changed files with 374 additions and 162 deletions

View File

@@ -9,145 +9,145 @@
[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 )
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 4 )
region = Rect2( 216, 0, 24, 70 )
atlas = ExtResource( 2 )
region = Rect2( 24, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 4 )
region = Rect2( 240, 0, 24, 70 )
atlas = ExtResource( 2 )
region = Rect2( 48, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 4 )
region = Rect2( 264, 0, 24, 70 )
region = Rect2( 120, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 4 )
region = Rect2( 288, 0, 24, 70 )
region = Rect2( 72, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 4 )
region = Rect2( 312, 0, 24, 70 )
atlas = ExtResource( 7 )
region = Rect2( 0, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 4 )
region = Rect2( 336, 0, 24, 70 )
atlas = ExtResource( 7 )
region = Rect2( 24, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 4 )
region = Rect2( 360, 0, 24, 70 )
atlas = ExtResource( 7 )
region = Rect2( 48, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 4 )
region = Rect2( 384, 0, 24, 70 )
atlas = ExtResource( 7 )
region = Rect2( 72, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 24, 70 )
atlas = ExtResource( 7 )
region = Rect2( 96, 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 )
atlas = ExtResource( 6 )
region = Rect2( 0, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=13]
atlas = ExtResource( 4 )
region = Rect2( 168, 0, 24, 70 )
atlas = ExtResource( 6 )
region = Rect2( 24, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=14]
atlas = ExtResource( 4 )
region = Rect2( 192, 0, 24, 70 )
region = Rect2( 336, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=15]
atlas = ExtResource( 4 )
region = Rect2( 96, 0, 24, 70 )
region = Rect2( 360, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=16]
atlas = ExtResource( 4 )
region = Rect2( 48, 0, 24, 70 )
region = Rect2( 384, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=17]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 96, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=18]
atlas = ExtResource( 2 )
region = Rect2( 24, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=19]
atlas = ExtResource( 2 )
region = Rect2( 48, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 144, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=20]
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 168, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=21]
atlas = ExtResource( 5 )
region = Rect2( 24, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 192, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=22]
atlas = ExtResource( 5 )
region = Rect2( 48, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 216, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=23]
atlas = ExtResource( 6 )
region = Rect2( 0, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 240, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=24]
atlas = ExtResource( 6 )
region = Rect2( 24, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 264, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=25]
atlas = ExtResource( 4 )
region = Rect2( 72, 0, 24, 70 )
region = Rect2( 288, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=26]
atlas = ExtResource( 7 )
region = Rect2( 0, 0, 24, 70 )
atlas = ExtResource( 4 )
region = Rect2( 312, 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 )
atlas = ExtResource( 4 )
region = Rect2( 48, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=28]
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=29]
atlas = ExtResource( 7 )
region = Rect2( 72, 0, 24, 70 )
atlas = ExtResource( 5 )
region = Rect2( 24, 0, 24, 70 )
[sub_resource type="AtlasTexture" id=30]
atlas = ExtResource( 7 )
region = Rect2( 96, 0, 24, 70 )
atlas = ExtResource( 5 )
region = Rect2( 48, 0, 24, 70 )
[sub_resource type="SpriteFrames" id=31]
animations = [ {
"frames": [ SubResource( 1 ) ],
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 2 ), SubResource( 3 ) ],
"loop": true,
"name": "speak_down",
"speed": 6.0
}, {
"frames": [ SubResource( 4 ) ],
"loop": true,
"name": "idle_down_left",
"speed": 5.0
}, {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"frames": [ SubResource( 5 ) ],
"loop": true,
"name": "walk_right",
"speed": 6.0
"name": "idle_up",
"speed": 5.0
}, {
"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 8 ) ],
"frames": [ SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ) ],
"loop": true,
"name": "walk_up",
"speed": 6.0
}, {
"frames": [ SubResource( 10 ) ],
"loop": true,
"name": "idle_down",
"name": "speak_right",
"speed": 5.0
}, {
"frames": [ SubResource( 11 ) ],
@@ -155,45 +155,45 @@ animations = [ {
"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 ) ],
"frames": [ SubResource( 12 ), SubResource( 13 ), SubResource( 12 ), SubResource( 13 ), SubResource( 13 ) ],
"loop": true,
"name": "speak_up",
"speed": 3.0
}, {
"frames": [ SubResource( 25 ) ],
"frames": [ SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 15 ) ],
"loop": true,
"name": "idle_up",
"name": "walk_up",
"speed": 6.0
}, {
"frames": [ SubResource( 17 ) ],
"loop": true,
"name": "idle_left",
"speed": 5.0
}, {
"frames": [ SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ],
"frames": [ SubResource( 18 ) ],
"loop": true,
"name": "speak_right",
"name": "idle_down",
"speed": 5.0
}, {
"frames": [ SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 20 ) ],
"loop": true,
"name": "walk_down",
"speed": 6.0
}, {
"frames": [ SubResource( 22 ), SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ) ],
"loop": true,
"name": "walk_right",
"speed": 6.0
}, {
"frames": [ SubResource( 27 ) ],
"loop": true,
"name": "idle_right",
"speed": 5.0
}, {
"frames": [ SubResource( 28 ), SubResource( 29 ), SubResource( 30 ) ],
"loop": true,
"name": "speak_down_right",
"speed": 6.0
} ]
[sub_resource type="CapsuleShape2D" id=32]

View File

@@ -0,0 +1,172 @@
[gd_resource type="Resource" load_steps=36 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 = 340
angle_size = 40
[sub_resource type="Resource" id=2]
script = ExtResource( 2 )
angle_start = 20
angle_size = 50
[sub_resource type="Resource" id=3]
script = ExtResource( 2 )
angle_start = 70
angle_size = 40
[sub_resource type="Resource" id=4]
script = ExtResource( 2 )
angle_start = 110
angle_size = 50
[sub_resource type="Resource" id=5]
script = ExtResource( 2 )
angle_start = 160
angle_size = 40
[sub_resource type="Resource" id=6]
script = ExtResource( 2 )
angle_start = 200
angle_size = 50
[sub_resource type="Resource" id=7]
script = ExtResource( 2 )
angle_start = 250
angle_size = 40
[sub_resource type="Resource" id=8]
script = ExtResource( 2 )
angle_start = 290
angle_size = 50
[sub_resource type="Resource" id=9]
script = ExtResource( 3 )
animation = "walk_down"
mirrored = false
[sub_resource type="Resource" id=10]
script = ExtResource( 3 )
animation = "walk_up"
mirrored = false
[sub_resource type="Resource" id=11]
script = ExtResource( 3 )
animation = "walk_left"
mirrored = false
[sub_resource type="Resource" id=12]
script = ExtResource( 3 )
animation = "walk_up"
mirrored = false
[sub_resource type="Resource" id=13]
script = ExtResource( 3 )
animation = "walk_right"
mirrored = false
[sub_resource type="Resource" id=14]
script = ExtResource( 3 )
animation = "walk_left"
mirrored = false
[sub_resource type="Resource" id=15]
script = ExtResource( 3 )
animation = "walk_up"
mirrored = true
[sub_resource type="Resource" id=16]
script = ExtResource( 3 )
animation = "walk_down"
mirrored = false
[sub_resource type="Resource" id=17]
script = ExtResource( 3 )
animation = "idle_up"
mirrored = false
[sub_resource type="Resource" id=18]
script = ExtResource( 3 )
animation = "idle_up"
mirrored = false
[sub_resource type="Resource" id=19]
script = ExtResource( 3 )
animation = "idle_right"
mirrored = false
[sub_resource type="Resource" id=20]
script = ExtResource( 3 )
animation = "idle_down_right"
mirrored = false
[sub_resource type="Resource" id=21]
script = ExtResource( 3 )
animation = "idle_down"
mirrored = false
[sub_resource type="Resource" id=22]
script = ExtResource( 3 )
animation = "idle_down_left"
mirrored = false
[sub_resource type="Resource" id=23]
script = ExtResource( 3 )
animation = "idle_left"
mirrored = false
[sub_resource type="Resource" id=24]
script = ExtResource( 3 )
animation = "idle_up"
mirrored = false
[sub_resource type="Resource" id=25]
script = ExtResource( 3 )
animation = "speak_up"
mirrored = false
[sub_resource type="Resource" id=26]
script = ExtResource( 3 )
animation = "speak_up"
mirrored = false
[sub_resource type="Resource" id=27]
script = ExtResource( 3 )
animation = "speak_right"
mirrored = false
[sub_resource type="Resource" id=28]
script = ExtResource( 3 )
animation = "speak_down"
mirrored = false
[sub_resource type="Resource" id=29]
script = ExtResource( 3 )
animation = "speak_down"
mirrored = false
[sub_resource type="Resource" id=30]
script = ExtResource( 3 )
animation = "speak_down"
mirrored = false
[sub_resource type="Resource" id=31]
script = ExtResource( 3 )
animation = "speak_right"
mirrored = true
[sub_resource type="Resource" id=32]
script = ExtResource( 3 )
animation = "speak_up"
mirrored = false
[resource]
script = ExtResource( 1 )
dir_angles = [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ]
directions = [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ) ]
idles = [ SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ), SubResource( 21 ), SubResource( 22 ), SubResource( 23 ), SubResource( 24 ) ]
speaks = [ SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ), SubResource( 29 ), SubResource( 30 ), SubResource( 31 ), SubResource( 32 ) ]