xiandie/scene/player/player_animation_config.gd
2025-06-18 21:02:36 +08:00

167 lines
6.2 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,
"light_height": 60.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 高6 低
5: [&"c00_吕萍_点灯_high", Vector2.ONE, Vector2(0, -87)],
6: [&"c00_吕萍_点灯_mid", Vector2.ONE, Vector2(1, -50)],
# 7 拿起纸杯
7: [&"c00_吕萍_拿纸杯", Vector2.ONE, Vector2(1, -65)],
# 8 监听纸杯
8: [&"c00_吕萍_听纸杯", Vector2.ONE, Vector2(1, -65)],
# 9 小手交互,吓摔倒
9: [&"c00_吕萍_背向吓倒", Vector2.ONE, Vector2(3, -90)],
# 10 瞎子卧室看到癞子
10: [&"c02_吕萍_蹲下来查看", Vector2.ONE, Vector2(1, -54.5)],
11: [&"c02_吕萍_被吓到后退", Vector2.ONE, Vector2(-32, -54.5)],
# 12 c00_吕萍_蹲下 13 c00_吕萍_蹲下呼吸 14 c00_吕萍_起立
12: [&"c00_吕萍_蹲下", Vector2.ONE, Vector2(20, -94.0)],
13: [&"c00_吕萍_蹲下呼吸", Vector2.ONE, Vector2(20, -94.0)],
14: [&"c00_吕萍_起立", Vector2.ONE, Vector2(20, -94.0)],
},
"吕萍爬行":
{
"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,
"light_height": 20.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"],
5: [&"c02_吕萍_匍匐起身蹲着窥视", Vector2.ONE, Vector2(0, -37)],
},
"吕萍带小猫":
{
"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,
"light_height": 60.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,
"light_height": 65.0,
# 人物脚底 offset吕萍为 0高 200px足底在 100px 处
"foot_offset": Vector2(22.5, -101),
MOVEMENT_IDLE: [&"c00_吕萍_拉箱子呼吸_镜像", &"c00_吕萍_拉箱子呼吸_镜像"],
MOVEMENT_WALKING: [&"c00_吕萍_拉箱子_镜像", &"c00_吕萍_拉箱子_镜像"],
},
# "小蝶":
# {
# "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,
"light_height": 40.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)],
},
"盒子猫":
{
"scale": Vector2(1, 1),
"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,
"light_height": 20.0,
# 如果使用 auto就会自动以最低点为基准
# "auto_foot_offset": true,
"foot_offset": Vector2(0, -68.0),
MOVEMENT_IDLE: [&"", &"c02_盒子猫_idle_r"],
# 此处为[2][3]分别为 sprite 向左、向右时的 offset
MOVEMENT_WALKING: [&"", &"c02_盒子猫_walking_r"],
MOVEMENT_RUNNING: [&"", &"c02_盒子猫_running_r"],
5: [&"c02_盒子猫钻进盒子", Vector2.ONE, Vector2(-20, -68.0)],
6: [&"", Vector2.ONE, Vector2(0, -68.0), "c02_盒子猫敲门_l", "c02_盒子猫敲门_r"],
7: [&"c02_盒子猫躲藏", Vector2.ONE, Vector2(0, -68.0)],
8: [&"c02_盒子猫停止躲藏", Vector2.ONE, Vector2(0, -68.0)],
},
}