调整动画参数配置等
This commit is contained in:
parent
af52072239
commit
e5422fa107
@ -1,8 +1,7 @@
|
|||||||
extends Panel
|
extends Panel
|
||||||
|
|
||||||
var config_path = "res://config/animation/frames_config.json"
|
var config_path = "res://config/animation/frames_config.json"
|
||||||
|
var scan_path = "res://asset/art/characters/"
|
||||||
@export var scan_path = "res://asset/art/characters/"
|
|
||||||
|
|
||||||
@onready var config_edit := %ConfigEdit
|
@onready var config_edit := %ConfigEdit
|
||||||
@onready var frames_display_grid := %FramesDisplayGrid
|
@onready var frames_display_grid := %FramesDisplayGrid
|
||||||
@ -36,9 +35,9 @@ func _ready() -> void:
|
|||||||
var window = get_viewport() as Window
|
var window = get_viewport() as Window
|
||||||
if window:
|
if window:
|
||||||
window.content_scale_stretch = Window.CONTENT_SCALE_STRETCH_FRACTIONAL
|
window.content_scale_stretch = Window.CONTENT_SCALE_STRETCH_FRACTIONAL
|
||||||
window.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_EXPAND
|
# window.content_scale_stretch = Window.CONTENT_SCALE_STRETCH_FRACTIONAL
|
||||||
window.get_visible_rect().size *= 2
|
# window.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_EXPAND
|
||||||
# window.size *= 2
|
# window.get_visible_rect().size *= 2
|
||||||
# remove cache and reload config
|
# remove cache and reload config
|
||||||
original_config = ResourceLoader.load(
|
original_config = ResourceLoader.load(
|
||||||
config_path, "JSON", ResourceLoader.CacheMode.CACHE_MODE_IGNORE
|
config_path, "JSON", ResourceLoader.CacheMode.CACHE_MODE_IGNORE
|
||||||
@ -171,7 +170,7 @@ func _display_cards(current_keys: Array):
|
|||||||
original_config.data.mapping[frames_name] = frames_name
|
original_config.data.mapping[frames_name] = frames_name
|
||||||
# frames_per_second
|
# frames_per_second
|
||||||
if not original_config.data["frames_per_second"].has(frames_name):
|
if not original_config.data["frames_per_second"].has(frames_name):
|
||||||
original_config.data.frames_per_second[frames_name] = 6
|
original_config.data.frames_per_second[frames_name] = 12
|
||||||
# mirror_mapping
|
# mirror_mapping
|
||||||
if not original_config.data["mirror_mapping"].has(frames_name):
|
if not original_config.data["mirror_mapping"].has(frames_name):
|
||||||
original_config.data.mirror_mapping[frames_name] = ""
|
original_config.data.mirror_mapping[frames_name] = ""
|
||||||
|
@ -1,45 +1,45 @@
|
|||||||
{
|
{
|
||||||
"frames_per_second": {
|
"frames_per_second": {
|
||||||
"idle小男孩": 7,
|
"idle小男孩": 7,
|
||||||
"idle车夫": 6,
|
"idle车夫": 12,
|
||||||
"idle鬼差红光": 6,
|
"idle鬼差红光": 12,
|
||||||
"running车夫": 6,
|
"running车夫": 12,
|
||||||
"walking鬼差红光": 6,
|
"walking鬼差红光": 12,
|
||||||
"右呼吸": 6,
|
"右呼吸": 12,
|
||||||
"右走路": 6,
|
"右走路": 12,
|
||||||
"吊猫动作帧": 6,
|
"吊猫动作帧": 12,
|
||||||
"吕萍头痛蹲下": 6,
|
"吕萍头痛蹲下": 12,
|
||||||
"吕萍爬行": 6,
|
"吕萍爬行": 12,
|
||||||
"吕萍背靠起身": 6,
|
"吕萍背靠起身": 12,
|
||||||
"吕萍记笔记": 6,
|
"吕萍记笔记": 12,
|
||||||
"吕萍风吹过": 6,
|
"吕萍风吹过": 12,
|
||||||
"小男孩-站起来": 6,
|
"小男孩-站起来": 12,
|
||||||
"小男孩-跑步": 6,
|
"小男孩-跑步": 20,
|
||||||
"小蝶-抬头+站起来": 6,
|
"小蝶-抬头+站起来": 12,
|
||||||
"小蝶-跑步": 6,
|
"小蝶-跑步": 15,
|
||||||
"小跑右": 6,
|
"小跑右": 20,
|
||||||
"小跑左": 6,
|
"小跑左": 17,
|
||||||
"左呼吸": 6,
|
"左呼吸": 12,
|
||||||
"左走路": 6,
|
"左走路": 12,
|
||||||
"张胖子": 6,
|
"张胖子": 12,
|
||||||
"弹珠": 6,
|
"弹珠": 12,
|
||||||
"捂脸": 6,
|
"捂脸": 12,
|
||||||
"捡球男孩关键帧": 6,
|
"捡球男孩关键帧": 12,
|
||||||
"李氏": 6,
|
"李氏": 12,
|
||||||
"母亲": 6,
|
"母亲": 12,
|
||||||
"爬出洞口": 6,
|
"爬出洞口": 12,
|
||||||
"父亲": 6,
|
"父亲": 12,
|
||||||
"父亲走路": 6,
|
"父亲走路": 20,
|
||||||
"王癞子": 6,
|
"王癞子": 12,
|
||||||
"癞子蹲着+呼吸": 6,
|
"癞子蹲着+呼吸": 12,
|
||||||
"瞎子": 6,
|
"瞎子": 12,
|
||||||
"站起来": 6,
|
"站起来": 12,
|
||||||
"被吓到后退": 6,
|
"被吓到后退": 12,
|
||||||
"起身蹲着窥视": 6,
|
"起身蹲着窥视": 12,
|
||||||
"跑步右": 6,
|
"跑步右": 20,
|
||||||
"跑步左": 6,
|
"跑步左": 20,
|
||||||
"蹲下来查看": 6,
|
"蹲下来查看": 12,
|
||||||
"钻出": 6,
|
"钻出": 12,
|
||||||
"黑手": 24
|
"黑手": 24
|
||||||
},
|
},
|
||||||
"mapping": {
|
"mapping": {
|
||||||
@ -986,4 +986,4 @@
|
|||||||
"钻出": "",
|
"钻出": "",
|
||||||
"黑手": ""
|
"黑手": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ extends Control
|
|||||||
@export var frames_config: JSON
|
@export var frames_config: JSON
|
||||||
@export var frame_dir_name := ""
|
@export var frame_dir_name := ""
|
||||||
@export var mapping_name := ""
|
@export var mapping_name := ""
|
||||||
@export var frames_per_sec := 6
|
@export var frames_per_sec := 0
|
||||||
# empty string means no first frame mapping
|
# empty string means no first frame mapping
|
||||||
@export var first_frame_mapping := ""
|
@export var first_frame_mapping := ""
|
||||||
# empty string means no mirror mapping
|
# empty string means no mirror mapping
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://5d6o5k30wsnc"]
|
[gd_scene load_steps=3 format=3 uid="uid://5d6o5k30wsnc"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://config/animation/frames_display_card.gd" id="1_8ollf"]
|
[ext_resource type="Script" path="res://config/animation/frames_display_card.gd" id="1_8ollf"]
|
||||||
[ext_resource type="SpriteFrames" uid="uid://c43gyexokirl4" path="res://config/animation/player_sprite_frames.tres" id="1_3338n"]
|
[ext_resource type="SpriteFrames" uid="uid://cs44glabs8sma" path="res://config/animation/player_sprite_frames.tres" id="1_3338n"]
|
||||||
|
|
||||||
[node name="FramesDisplayCard" type="VBoxContainer"]
|
[node name="FramesDisplayCard" type="VBoxContainer"]
|
||||||
offset_right = 103.0
|
offset_right = 103.0
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user