xiandie/scene/player/player_animation_config.gd

99 lines
3.3 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class_name PlayerAnimationConfig extends RefCounted
enum {
# movement animation
MOVEMENT_IDLE,
MOVEMENT_WALKING,
MOVEMENT_RUNNING,
# action animation
ACTION_NONE,
ACTION_LOOKUP_WALL,
}
const ANIMATION_CONFIG = {
"吕萍":
{
"scale": Vector2(0.6, 0.6),
"speed_walking": 75.0,
"running_locked": false,
"speed_runnig": 120.0,
"walk_footstep": 0.5,
"run_footstep": 7.0 / 10.0 / 2.0,
# 内心 os 时dialogue 的高度
"os_height": 60.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(0, 0),
MOVEMENT_IDLE: [&"c00_吕萍_idle_left", &"c00_吕萍_idle_right"],
MOVEMENT_WALKING: [&"c00_吕萍_walking_left", &"c00_吕萍_walking_right"],
MOVEMENT_RUNNING: [&"c00_吕萍_running_left", &"c00_吕萍_running_right"],
# animation_name, scale, offset
ACTION_LOOKUP_WALL: [&"c00_吕萍_记笔记_right", Vector2(1.2, 1.2), Vector2(0, 0)],
},
"吕萍爬行":
{
"scale": Vector2(0.6, 0.6),
"speed_walking": 50.0,
"running_locked": true,
"speed_runnig": 50.0,
"walk_footstep": 0.7,
"run_footstep": 0.7,
"os_height": 10.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
# 吕萍爬行高 59px
"foot_offset": Vector2(0, 27.0),
MOVEMENT_IDLE: [&"c02_吕萍_爬行_idle_l", &"c02_吕萍_爬行_idle_r"],
MOVEMENT_WALKING: [&"c02_吕萍_爬行_left", &"c02_吕萍_爬行_right"],
MOVEMENT_RUNNING: [&"c02_吕萍_爬行_left", &"c02_吕萍_爬行_right"],
},
"吕萍带小猫":
{
"scale": Vector2(0.6, 0.6),
"speed_walking": 75.0,
"running_locked": true,
"speed_runnig": 75.0,
"walk_footstep": 0.5,
"run_footstep": 0.5,
"os_height": 60.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(0, 0),
MOVEMENT_IDLE: [&"c00_吕萍带小猫_idle_left", &"c00_吕萍带小猫_idle_right"],
MOVEMENT_WALKING: [&"c00_吕萍带小猫_walking_left", &"c00_吕萍带小猫_walking_right"],
MOVEMENT_RUNNING: [&"c00_吕萍带小猫_walking_left", &"c00_吕萍带小猫_walking_right"],
},
"小蝶":
{
"scale": Vector2.ONE,
"speed_walking": 75.0,
"running_locked": true,
"speed_runnig": 75.0,
"walk_footstep": 0.5,
"run_footstep": 7.0 / 10.0 / 2.0,
"os_height": 50.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(0, 0),
MOVEMENT_IDLE: [&"c00_吕萍_idle_left", &"c00_吕萍_idle_right"],
MOVEMENT_WALKING: [&"c00_吕萍_walking_left", &"c00_吕萍_walking_right"],
MOVEMENT_RUNNING: [&"c00_吕萍_running_left", &"c00_吕萍_running_right"],
},
"小小蝶":
{
"scale": Vector2.ONE,
"speed_walking": 65.0,
"running_locked": false,
"speed_runnig": 100.0,
"walk_footstep": 0.5,
"run_footstep": 7.0 / 10.0 / 2.0,
"os_height": 10.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
# 小蝶高 124px行走时 116px
"foot_offset": Vector2(0, 20.0),
MOVEMENT_IDLE: [&"c01_小小蝶_idle_l", &"c01_小小蝶_idle_r"],
# 此处为[2][3]分别为 sprite 向左、向右时的 offset
MOVEMENT_WALKING:
[&"c01_小小蝶_walking_l", &"c01_小小蝶_walking_r"],
MOVEMENT_RUNNING: [&"c01_小小蝶_running_l", &"c01_小小蝶_running_r"],
# animation_name, scale, offset, left, right
ACTION_LOOKUP_WALL: [&"", Vector2(1, 1), Vector2(0, 20.0), &"c01_小小蝶_抬头_l", &"c01_小小蝶_抬头_r"],
},
}