xiandie/scene/player/player_animation_config.gd
2025-05-22 04:16:27 +08:00

131 lines
4.7 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,
}
var ANIMATION_CONFIG = {
"吕萍":
{
"scale": Vector2(0.5, 0.5),
"speed_walking": 60.0,
"can_run": true,
"speed_runnig": 110.0,
"walk_footstep": 0.5,
"run_footstep": 7.0 / 10.0 / 2.0,
# 内心 os 时dialogue 的高度
"os_height": 120.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(0, -100),
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, -50)],
5: [&"c00_吕萍_点灯", Vector2.ONE, Vector2(0, -87)],
# TODO 替换为低位点灯5 高6 低)
6: [&"c00_吕萍_点灯", Vector2.ONE, Vector2(0, -87)],
# 7 拿起纸杯
7: [&"c00_吕萍_拿纸杯", Vector2.ONE, Vector2(1, -65)],
# 8 监听纸杯
8: [&"c00_吕萍_听纸杯", Vector2.ONE, Vector2(1, -65)],
},
"吕萍爬行":
{
"scale": Vector2.ONE,
"speed_walking": 40.0,
"can_run": false,
"speed_runnig": 40.0,
"walk_footstep": 0.7,
"run_footstep": 0.7,
"os_height": 50.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
# 吕萍爬行高 59px
"foot_offset": Vector2(0, -23.5),
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": 60.0,
"can_run": false,
"speed_runnig": 60.0,
"walk_footstep": 0.5,
"run_footstep": 0.5,
"os_height": 120.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(0, -100),
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(1.0, 1.0),
"speed_walking": 40.0,
"can_run": false,
"speed_runnig": 40.0,
"walk_footstep": 0.5,
"run_footstep": 0.5,
"os_height": 120.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(0, -44),
MOVEMENT_IDLE: [&"c00_吕萍_推柜子_idle", &"c00_吕萍_推柜子_idle"],
MOVEMENT_WALKING: [&"c00_吕萍_推柜子_l", &"c00_吕萍_推柜子_r"],
MOVEMENT_RUNNING: [&"c00_吕萍_推柜子_l", &"c00_吕萍_推柜子_r"],
},
# "小蝶":
# {
# "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": 55.0,
"can_run": true,
"speed_runnig": 100.0,
"walk_footstep": 0.5,
"run_footstep": 7.0 / 10.0 / 2.0,
"os_height": 70.0,
# 如果使用 auto就会自动以最低点为基准
# "auto_foot_offset": true,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
# 小蝶高 124px行走时 116px
"foot_offset": Vector2(0, -37.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, left, right
ACTION_LOOKUP_WALL:
[&"c01_小小蝶_背面抬头", Vector2.ONE, Vector2(-3.0, -37.0), &"c01_小小蝶_抬头_l", &"c01_小小蝶_抬头_r"],
# 看向橱柜c01_s07 书店外)
5: [&"c01_小小蝶_书店外看向橱窗", Vector2.ONE, Vector2(0, -88.0)],
# 敲门c01_s07 书店外)
6: [&"c01_小小蝶_书店外敲门", Vector2.ONE, Vector2(0, -88.0)],
# c01_s09 小小蝶_公寓楼道口探头
7: [&"c01_小小蝶_公寓楼道口探头", Vector2.ONE, Vector2(-3, -82.5)],
# c01_s08 小小蝶_书店递报纸
8: [&"c01_小小蝶_书店递报纸", Vector2.ONE, Vector2(-5, -98.5)],
},
}