c01_s06 动画自动播放脚本(转身-呼吸,画画-呼吸,踢球小孩等)
This commit is contained in:
parent
47e43bbe82
commit
097594f22b
@ -112,7 +112,7 @@ animations = [{
|
|||||||
"duration": 30.0,
|
"duration": 30.0,
|
||||||
"texture": ExtResource("2_gc6kb")
|
"texture": ExtResource("2_gc6kb")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": false,
|
||||||
"name": &"【画画小女孩】回头",
|
"name": &"【画画小女孩】回头",
|
||||||
"speed": 30.0
|
"speed": 30.0
|
||||||
}, {
|
}, {
|
||||||
@ -129,7 +129,7 @@ animations = [{
|
|||||||
"duration": 12.0,
|
"duration": 12.0,
|
||||||
"texture": ExtResource("4_td1ff")
|
"texture": ExtResource("4_td1ff")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": false,
|
||||||
"name": &"【画画小女孩】画画",
|
"name": &"【画画小女孩】画画",
|
||||||
"speed": 30.0
|
"speed": 30.0
|
||||||
}, {
|
}, {
|
||||||
|
@ -274,13 +274,13 @@ animations = [{
|
|||||||
"duration": 10.5,
|
"duration": 10.5,
|
||||||
"texture": ExtResource("49_5qald")
|
"texture": ExtResource("49_5qald")
|
||||||
}, {
|
}, {
|
||||||
"duration": 10.5,
|
"duration": 50.0,
|
||||||
"texture": ExtResource("50_ndrgc")
|
"texture": ExtResource("50_ndrgc")
|
||||||
}, {
|
}, {
|
||||||
"duration": 10.5,
|
"duration": 10.5,
|
||||||
"texture": ExtResource("51_rtpby")
|
"texture": ExtResource("51_rtpby")
|
||||||
}, {
|
}, {
|
||||||
"duration": 10.5,
|
"duration": 10.0,
|
||||||
"texture": ExtResource("52_yncgy")
|
"texture": ExtResource("52_yncgy")
|
||||||
}],
|
}],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
@ -334,7 +334,7 @@ animations = [{
|
|||||||
"duration": 6.0,
|
"duration": 6.0,
|
||||||
"texture": ExtResource("64_6j8gg")
|
"texture": ExtResource("64_6j8gg")
|
||||||
}, {
|
}, {
|
||||||
"duration": 6.0,
|
"duration": 30.0,
|
||||||
"texture": ExtResource("65_5sckl")
|
"texture": ExtResource("65_5sckl")
|
||||||
}, {
|
}, {
|
||||||
"duration": 6.0,
|
"duration": 6.0,
|
||||||
|
@ -31,6 +31,7 @@ var hook_animation = ""
|
|||||||
if is_node_ready() and Engine.is_editor_hint():
|
if is_node_ready() and Engine.is_editor_hint():
|
||||||
notify_property_list_changed()
|
notify_property_list_changed()
|
||||||
var hook_dialogue_title = ""
|
var hook_dialogue_title = ""
|
||||||
|
var hook_method = ""
|
||||||
|
|
||||||
var dialogue_c01 = preload("res://asset/dialogue/c01.dialogue")
|
var dialogue_c01 = preload("res://asset/dialogue/c01.dialogue")
|
||||||
var dialogue_c02 = preload("res://asset/dialogue/c02.dialogue")
|
var dialogue_c02 = preload("res://asset/dialogue/c02.dialogue")
|
||||||
@ -128,6 +129,10 @@ func _do_trigger():
|
|||||||
SceneManager.freeze_player(0.0)
|
SceneManager.freeze_player(0.0)
|
||||||
DialogueManager.show_dialogue_balloon(dialogue_res, hook_dialogue_title)
|
DialogueManager.show_dialogue_balloon(dialogue_res, hook_dialogue_title)
|
||||||
DialogueManager.dialogue_ended.connect(_on_dialogue_ended, CONNECT_ONE_SHOT)
|
DialogueManager.dialogue_ended.connect(_on_dialogue_ended, CONNECT_ONE_SHOT)
|
||||||
|
if hook_method:
|
||||||
|
var animation_player = _get_animation_player()
|
||||||
|
if animation_player:
|
||||||
|
animation_player.call(hook_method)
|
||||||
triggered.emit()
|
triggered.emit()
|
||||||
if GlobalConfig.DEBUG:
|
if GlobalConfig.DEBUG:
|
||||||
print("ambush triggered! name=", name)
|
print("ambush triggered! name=", name)
|
||||||
@ -147,6 +152,8 @@ func _get(property: StringName) -> Variant:
|
|||||||
return hook_dialogue_title
|
return hook_dialogue_title
|
||||||
elif property == "hook_animation":
|
elif property == "hook_animation":
|
||||||
return hook_animation
|
return hook_animation
|
||||||
|
elif property == "hook_method":
|
||||||
|
return hook_method
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
|
||||||
@ -157,25 +164,54 @@ func _set(property: StringName, value: Variant) -> bool:
|
|||||||
elif property == "hook_animation":
|
elif property == "hook_animation":
|
||||||
hook_animation = value
|
hook_animation = value
|
||||||
return true
|
return true
|
||||||
|
elif property == "hook_method":
|
||||||
|
hook_method = value
|
||||||
|
return true
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
|
||||||
func _get_property_list() -> Array[Dictionary]:
|
func _get_property_list() -> Array[Dictionary]:
|
||||||
var animation_list: PackedStringArray
|
var hint_methods = ""
|
||||||
var animation_player = _get_animation_player()
|
var hint_animation = ""
|
||||||
if animation_player:
|
if Engine.is_editor_hint():
|
||||||
animation_list = animation_player.get_animation_list()
|
var animation_player = _get_animation_player()
|
||||||
|
if animation_player:
|
||||||
|
# 更新 hook_animation 的可选项
|
||||||
|
var animation_list = animation_player.get_animation_list()
|
||||||
|
hint_animation = ",".join(animation_list)
|
||||||
|
# 更新 hook_method 的可选项
|
||||||
|
var method_list = animation_player.get_method_list()
|
||||||
|
var methods = []
|
||||||
|
for method in method_list:
|
||||||
|
if (
|
||||||
|
# bit operation
|
||||||
|
(method.flags == METHOD_FLAG_NORMAL)
|
||||||
|
# and method.args.size() == method.default_args.size()
|
||||||
|
and method.args.is_empty()
|
||||||
|
and not method.name.begins_with("_")
|
||||||
|
):
|
||||||
|
methods.append(method.name)
|
||||||
|
hint_methods = ",".join(methods)
|
||||||
|
var hint_dialogue_title = ""
|
||||||
|
if Engine.is_editor_hint():
|
||||||
|
hint_dialogue_title = ",".join(dialogue_res.get_ordered_titles())
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"name": "hook_dialogue_title",
|
"name": "hook_dialogue_title",
|
||||||
"type": TYPE_STRING,
|
"type": TYPE_STRING,
|
||||||
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
||||||
"hint_string": ",".join(dialogue_res.get_ordered_titles())
|
"hint_string": hint_dialogue_title
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hook_animation",
|
"name": "hook_animation",
|
||||||
"type": TYPE_STRING,
|
"type": TYPE_STRING,
|
||||||
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
||||||
"hint_string": ",".join(animation_list)
|
"hint_string": hint_animation
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hook_method",
|
||||||
|
"type": TYPE_STRING,
|
||||||
|
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
||||||
|
"hint_string": hint_methods
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -11,9 +11,12 @@ size = Vector2(10, 70)
|
|||||||
script = ExtResource("1_rxgbr")
|
script = ExtResource("1_rxgbr")
|
||||||
hook_dialogue_title = ""
|
hook_dialogue_title = ""
|
||||||
hook_animation = ""
|
hook_animation = ""
|
||||||
|
hook_method = ""
|
||||||
|
|
||||||
[node name="Sign" parent="." instance=ExtResource("2_n51wc")]
|
[node name="Sign" parent="." instance=ExtResource("2_n51wc")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
display_sign = false
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="."]
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
84
scene/entity/general/autoplay_animated_sprite.gd
Normal file
84
scene/entity/general/autoplay_animated_sprite.gd
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
@tool
|
||||||
|
extends AnimatedSprite2D
|
||||||
|
|
||||||
|
@export var autostart := true
|
||||||
|
@export var state_configs := [] as Array[StateActionConfigResource]
|
||||||
|
var auto_checkout_dict = {
|
||||||
|
# intro -> {state_config instance}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
_load_config()
|
||||||
|
if Engine.is_editor_hint():
|
||||||
|
return
|
||||||
|
if autostart and animation:
|
||||||
|
# 制造一点错差
|
||||||
|
frame = randi() % sprite_frames.get_frame_count(animation)
|
||||||
|
play()
|
||||||
|
animation_finished.connect(_on_animation_finished)
|
||||||
|
|
||||||
|
|
||||||
|
func _load_config():
|
||||||
|
for i in range(state_configs.size()):
|
||||||
|
var state_config = state_configs[i]
|
||||||
|
if sprite_frames and sprite_frames.has_animation(state_config.animation_intro):
|
||||||
|
# intro 的 animation 关闭循环
|
||||||
|
sprite_frames.set_animation_loop(state_config.animation_intro, false)
|
||||||
|
auto_checkout_dict[state_config.animation_intro] = {
|
||||||
|
"animation_next": state_config.animation_next,
|
||||||
|
"animation_wait_time": state_config.animation_wait_time,
|
||||||
|
"intro_loop": max(1, state_config.intro_loop)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func _on_animation_finished() -> void:
|
||||||
|
if auto_checkout_dict.has(animation):
|
||||||
|
auto_checkout_dict[animation].intro_loop -= 1
|
||||||
|
if auto_checkout_dict[animation].intro_loop <= 0:
|
||||||
|
var wait_time = auto_checkout_dict[animation].animation_wait_time
|
||||||
|
var next = auto_checkout_dict[animation].animation_next
|
||||||
|
if wait_time > 0:
|
||||||
|
pause()
|
||||||
|
get_tree().create_timer(wait_time).timeout.connect(play.bind(next))
|
||||||
|
else:
|
||||||
|
play(next)
|
||||||
|
|
||||||
|
|
||||||
|
# const gif_root_dir = "res://asset/art/gif/"
|
||||||
|
# var gif_dir:
|
||||||
|
# set(val):
|
||||||
|
# gif_dir = val
|
||||||
|
# # 只在编辑器模式下加载配置
|
||||||
|
# if Engine.is_editor_hint() and gif_dir:
|
||||||
|
# sprite_frames = load(gif_root_dir + gif_dir + "/frames.tres")
|
||||||
|
|
||||||
|
|
||||||
|
# func _get(property: StringName) -> Variant:
|
||||||
|
# if property == "gif_dir":
|
||||||
|
# return gif_dir
|
||||||
|
# return null
|
||||||
|
|
||||||
|
|
||||||
|
# func _set(property: StringName, value: Variant) -> bool:
|
||||||
|
# if property == "gif_dir":
|
||||||
|
# gif_dir = value
|
||||||
|
# return true
|
||||||
|
# return false
|
||||||
|
|
||||||
|
|
||||||
|
# func _get_property_list() -> Array[Dictionary]:
|
||||||
|
# # 只在编辑器模式下加载配置
|
||||||
|
# var hint_str = ""
|
||||||
|
# if Engine.is_editor_hint():
|
||||||
|
# var dir_access = DirAccess.open(gif_root_dir) as DirAccess
|
||||||
|
# var dirs = dir_access.get_directories()
|
||||||
|
# hint_str = ",".join(dirs)
|
||||||
|
# return [
|
||||||
|
# {
|
||||||
|
# "name": "gif_dir",
|
||||||
|
# "type": TYPE_STRING,
|
||||||
|
# "hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
||||||
|
# "hint_string": hint_str
|
||||||
|
# }
|
||||||
|
# ]
|
9
scene/entity/general/autoplay_animated_sprite.tscn
Normal file
9
scene/entity/general/autoplay_animated_sprite.tscn
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://b50n0hvs4yh75"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scene/entity/general/autoplay_animated_sprite.gd" id="1_21eda"]
|
||||||
|
[ext_resource type="Script" path="res://scene/entity/general/state_action_res.gd" id="2_pvtjh"]
|
||||||
|
|
||||||
|
[node name="AutoplayAnimatedSprite" type="AnimatedSprite2D"]
|
||||||
|
script = ExtResource("1_21eda")
|
||||||
|
state_configs = Array[ExtResource("2_pvtjh")]([])
|
||||||
|
gif_dir = ""
|
8
scene/entity/general/state_action_res.gd
Normal file
8
scene/entity/general/state_action_res.gd
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
class_name StateActionConfigResource extends Resource
|
||||||
|
|
||||||
|
@export var animation_intro := ""
|
||||||
|
# intro 播放几次
|
||||||
|
@export var intro_loop := 1
|
||||||
|
# 这个最好使用延长动画帧最后一帧时长的方式来实现
|
||||||
|
@export var animation_wait_time := 0.0
|
||||||
|
@export var animation_next := ""
|
@ -33,7 +33,6 @@ var items: PackedStringArray
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if Engine.is_editor_hint():
|
if Engine.is_editor_hint():
|
||||||
_reload_items()
|
_reload_items()
|
||||||
notify_property_list_changed()
|
|
||||||
return
|
return
|
||||||
area2d.body_entered.connect(_reset)
|
area2d.body_entered.connect(_reset)
|
||||||
area2d.body_exited.connect(_on_cancel)
|
area2d.body_exited.connect(_on_cancel)
|
||||||
@ -48,6 +47,7 @@ func _ready() -> void:
|
|||||||
texture = texture_after
|
texture = texture_after
|
||||||
|
|
||||||
func _reload_items() -> void:
|
func _reload_items() -> void:
|
||||||
|
items.clear()
|
||||||
var id = item_config_res.titles["PropItems"]
|
var id = item_config_res.titles["PropItems"]
|
||||||
var current_line = item_config_res.lines[id]
|
var current_line = item_config_res.lines[id]
|
||||||
while current_line:
|
while current_line:
|
||||||
@ -56,6 +56,7 @@ func _reload_items() -> void:
|
|||||||
if not current_line.has("next_id") or current_line.next_id == "end":
|
if not current_line.has("next_id") or current_line.next_id == "end":
|
||||||
break
|
break
|
||||||
current_line = item_config_res.lines[current_line.next_id]
|
current_line = item_config_res.lines[current_line.next_id]
|
||||||
|
notify_property_list_changed()
|
||||||
|
|
||||||
|
|
||||||
func _reset(_body = null) -> void:
|
func _reset(_body = null) -> void:
|
||||||
|
@ -138,23 +138,23 @@ func _get(property: StringName) -> Variant:
|
|||||||
return null
|
return null
|
||||||
|
|
||||||
|
|
||||||
func _get_property_list() -> Array[Dictionary]: # only show notes_ properties in editor
|
func _get_property_list() -> Array[Dictionary]:
|
||||||
if Engine.is_editor_hint() and editor_filter and editor_filter != "none":
|
var titles = ""
|
||||||
var filted_titles = content_dialogue.get_ordered_titles().filter(_filter_property)
|
# only show notes_ properties in editor
|
||||||
return [
|
if Engine.is_editor_hint():
|
||||||
{
|
var ordered_titles = content_dialogue.get_ordered_titles()
|
||||||
"name": "content_key",
|
if editor_filter and editor_filter != "none":
|
||||||
"type": TYPE_STRING,
|
var filted_titles = ordered_titles.filter(_filter_property)
|
||||||
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
if filted_titles.size() > 0:
|
||||||
"hint_string": ",".join(filted_titles)
|
titles = ",".join(filted_titles)
|
||||||
}
|
else:
|
||||||
]
|
titles = ",".join(ordered_titles)
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"name": "content_key",
|
"name": "content_key",
|
||||||
"type": TYPE_STRING,
|
"type": TYPE_STRING,
|
||||||
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
||||||
"hint_string": ",".join(content_dialogue.get_ordered_titles())
|
"hint_string": titles
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -122,23 +122,24 @@ func _get(property: StringName) -> Variant:
|
|||||||
func _get_property_list() -> Array[Dictionary]:
|
func _get_property_list() -> Array[Dictionary]:
|
||||||
# only show notes_ properties in editor
|
# only show notes_ properties in editor
|
||||||
var titles = ""
|
var titles = ""
|
||||||
var title_arr = []
|
if Engine.is_editor_hint():
|
||||||
if dialogue == "items":
|
var title_arr = []
|
||||||
var id = dialogue_items.titles["Notes"]
|
if dialogue == "items":
|
||||||
var current_line = dialogue_items.lines[id]
|
var id = dialogue_items.titles["Notes"]
|
||||||
while current_line:
|
var current_line = dialogue_items.lines[id]
|
||||||
if current_line.has("translation_key"):
|
while current_line:
|
||||||
title_arr.append(current_line.translation_key)
|
if current_line.has("translation_key"):
|
||||||
if not current_line.has("next_id") or current_line.next_id == "end":
|
title_arr.append(current_line.translation_key)
|
||||||
break
|
if not current_line.has("next_id") or current_line.next_id == "end":
|
||||||
current_line = dialogue_items.lines[current_line.next_id]
|
break
|
||||||
else:
|
current_line = dialogue_items.lines[current_line.next_id]
|
||||||
title_arr = dialogue_res.get_ordered_titles()
|
else:
|
||||||
if Engine.is_editor_hint() and title_filter and title_filter != "none":
|
title_arr = dialogue_res.get_ordered_titles()
|
||||||
var filted_titles = title_arr.filter(_filter_property)
|
if title_filter and title_filter != "none":
|
||||||
titles = ",".join(filted_titles)
|
var filted_titles = title_arr.filter(_filter_property)
|
||||||
else:
|
titles = ",".join(filted_titles)
|
||||||
titles = ",".join(title_arr)
|
else:
|
||||||
|
titles = ",".join(title_arr)
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"name": "note_key",
|
"name": "note_key",
|
||||||
|
@ -74,11 +74,14 @@ func _set(property: StringName, value: Variant) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
func _get_property_list() -> Array[Dictionary]:
|
func _get_property_list() -> Array[Dictionary]:
|
||||||
|
var hint_str = ""
|
||||||
|
if Engine.is_editor_hint():
|
||||||
|
hint_str = ",".join(dialogue_res.get_ordered_titles())
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
"name": "dialogue_title",
|
"name": "dialogue_title",
|
||||||
"type": TYPE_STRING,
|
"type": TYPE_STRING,
|
||||||
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
"hint": PROPERTY_HINT_ENUM_SUGGESTION,
|
||||||
"hint_string": ",".join(dialogue_res.get_ordered_titles())
|
"hint_string": hint_str
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -30,6 +30,12 @@ var zooming_and_focus_progress := 1.0
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if not focusing_node:
|
if not focusing_node:
|
||||||
push_error("Focusing node not found")
|
push_error("Focusing node not found")
|
||||||
|
reset_position_immediately()
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
if is_node_ready():
|
||||||
|
reset_position_immediately()
|
||||||
|
|
||||||
|
|
||||||
func reset_position_immediately():
|
func reset_position_immediately():
|
||||||
|
@ -58,15 +58,6 @@ camera_marker = NodePath("../CameraFocusMarker")
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
position = Vector2(26, 88)
|
position = Vector2(26, 88)
|
||||||
focusing_node = NodePath("../MainPlayer")
|
focusing_node = NodePath("../MainPlayer")
|
||||||
force_offset = null
|
|
||||||
lock_horizontal = null
|
|
||||||
speed = null
|
|
||||||
half_screen_size = null
|
|
||||||
shaded_height = null
|
|
||||||
shake_enabled = null
|
|
||||||
shake_strength = null
|
|
||||||
shake_recovery_speed = null
|
|
||||||
zoom_ratio = null
|
|
||||||
|
|
||||||
[node name="ParallaxForeground" type="ParallaxBackground" parent="."]
|
[node name="ParallaxForeground" type="ParallaxBackground" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
@ -648,6 +648,7 @@ position = Vector2(270, 23.5)
|
|||||||
texture = ExtResource("12_jtglg")
|
texture = ExtResource("12_jtglg")
|
||||||
trigger_mode = "interact"
|
trigger_mode = "interact"
|
||||||
hook_animation = "使用鸡毛掸子"
|
hook_animation = "使用鸡毛掸子"
|
||||||
|
hook_method = null
|
||||||
|
|
||||||
[node name="使用鸡毛掸子" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="7"]
|
[node name="使用鸡毛掸子" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="7"]
|
||||||
visible = false
|
visible = false
|
||||||
@ -724,6 +725,13 @@ character = "小小蝶"
|
|||||||
|
|
||||||
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||||
force_offset = Vector2(0, 0)
|
force_offset = Vector2(0, 0)
|
||||||
|
lock_horizontal = true
|
||||||
|
speed = 5.0
|
||||||
|
half_screen_size = Vector2(282, 120)
|
||||||
|
shaded_height = 38
|
||||||
|
shake_enabled = false
|
||||||
|
shake_strength = 2.0
|
||||||
|
shake_recovery_speed = 8.0
|
||||||
zoom_ratio = 1.0
|
zoom_ratio = 1.0
|
||||||
|
|
||||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||||
|
@ -16,10 +16,12 @@ func _ready() -> void:
|
|||||||
var dean
|
var dean
|
||||||
var red_girl
|
var red_girl
|
||||||
|
|
||||||
|
var drawing_kids
|
||||||
|
|
||||||
func _on_ground_ready() -> void:
|
func _on_ground_ready() -> void:
|
||||||
dean = $"../ParallaxForeground/BGParallaxLayer/门口_院长"
|
dean = $"../ParallaxForeground/BGParallaxLayer/门口_院长"
|
||||||
red_girl = $"../ParallaxForeground/BGParallaxLayer/门口_红衣姑娘"
|
red_girl = $"../ParallaxForeground/BGParallaxLayer/门口_红衣姑娘"
|
||||||
|
drawing_kids = $"../DeployLayer/drawing_kids"
|
||||||
# 院长翻书
|
# 院长翻书
|
||||||
var timer = Timer.new()
|
var timer = Timer.new()
|
||||||
timer.set_wait_time(5.0)
|
timer.set_wait_time(5.0)
|
||||||
@ -29,6 +31,11 @@ func _on_ground_ready() -> void:
|
|||||||
timer.timeout.connect(_dean_flip_book)
|
timer.timeout.connect(_dean_flip_book)
|
||||||
|
|
||||||
|
|
||||||
|
func play_drawing() -> void:
|
||||||
|
for c in drawing_kids.get_children():
|
||||||
|
if c is AnimatedSprite2D:
|
||||||
|
c.play(c.name + "画画")
|
||||||
|
|
||||||
func _dean_flip_book() -> void:
|
func _dean_flip_book() -> void:
|
||||||
if dean.animation == "院长呼吸":
|
if dean.animation == "院长呼吸":
|
||||||
# 翻书后会自动播放呼吸动画
|
# 翻书后会自动播放呼吸动画
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=16 format=3 uid="uid://bx16c8nn32f40"]
|
[gd_scene load_steps=30 format=3 uid="uid://bx16c8nn32f40"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_bitx7"]
|
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_bitx7"]
|
||||||
[ext_resource type="Script" path="res://scene/ground/scene/c01/s06_animation.gd" id="2_fkfhi"]
|
[ext_resource type="Script" path="res://scene/ground/scene/c01/s06_animation.gd" id="2_fkfhi"]
|
||||||
@ -9,8 +9,9 @@
|
|||||||
[ext_resource type="SpriteFrames" uid="uid://cemn2bnebsfko" path="res://asset/art/scene/c01/s06_孤儿院长廊围墙/全局参考.gif" id="4_8hecq"]
|
[ext_resource type="SpriteFrames" uid="uid://cemn2bnebsfko" path="res://asset/art/scene/c01/s06_孤儿院长廊围墙/全局参考.gif" id="4_8hecq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bllt2wycchkp2" path="res://asset/art/scene/c01/s06_孤儿院长廊围墙/e_红柱子.png" id="4_dtycx"]
|
[ext_resource type="Texture2D" uid="uid://bllt2wycchkp2" path="res://asset/art/scene/c01/s06_孤儿院长廊围墙/e_红柱子.png" id="4_dtycx"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cpc5037mesjl7" path="res://scene/ground/script/c01/s06_踢球男孩.tscn" id="5_erliv"]
|
[ext_resource type="PackedScene" uid="uid://cpc5037mesjl7" path="res://scene/ground/script/c01/s06_踢球男孩.tscn" id="5_erliv"]
|
||||||
[ext_resource type="Script" path="res://scene/ground/script/general/autoplay_animated_sprite.gd" id="6_4o4lo"]
|
|
||||||
[ext_resource type="SpriteFrames" uid="uid://c6okvaeemoodq" path="res://asset/art/gif/c01_孤儿院围墙/frames.tres" id="7_dsj2r"]
|
[ext_resource type="SpriteFrames" uid="uid://c6okvaeemoodq" path="res://asset/art/gif/c01_孤儿院围墙/frames.tres" id="7_dsj2r"]
|
||||||
|
[ext_resource type="Script" path="res://scene/entity/general/state_action_res.gd" id="9_lg0nw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b50n0hvs4yh75" path="res://scene/entity/general/autoplay_animated_sprite.tscn" id="9_on7ga"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="11_tudob"]
|
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="11_tudob"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_723yg"]
|
[sub_resource type="Animation" id="Animation_723yg"]
|
||||||
@ -40,7 +41,7 @@ tracks/1/path = NodePath("ParallaxForeground/BGParallaxLayer/门口_红衣姑娘
|
|||||||
tracks/1/interp = 1
|
tracks/1/interp = 1
|
||||||
tracks/1/loop_wrap = true
|
tracks/1/loop_wrap = true
|
||||||
tracks/1/keys = {
|
tracks/1/keys = {
|
||||||
"times": PackedFloat32Array(0),
|
"times": PackedFloat32Array(0.0333333),
|
||||||
"transitions": PackedFloat32Array(1),
|
"transitions": PackedFloat32Array(1),
|
||||||
"values": [{
|
"values": [{
|
||||||
"args": [&"红衣姑娘抬头", 1.0, false],
|
"args": [&"红衣姑娘抬头", 1.0, false],
|
||||||
@ -54,6 +55,94 @@ _data = {
|
|||||||
"门口_观望": SubResource("Animation_2113b")
|
"门口_观望": SubResource("Animation_2113b")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_g8vrg"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【画画小女孩】回头"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【画画小女孩】呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_nivp4"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【画画小女孩】画画"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 2.0
|
||||||
|
animation_next = "【画画小女孩】呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_600pb"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
size = Vector2(100, 70)
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_yc62b"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【画画男孩-1】画画"
|
||||||
|
intro_loop = 2
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【画画男孩-1】呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ls4y8"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【画画男孩-2】画画"
|
||||||
|
intro_loop = 2
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【画画男孩-2】呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_0muca"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【站立小孩-1】挠痒呼吸"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【站立小孩-1】侧面呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_unrl6"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【站立小孩-2】转身"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【站立小孩-3】侧面呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_7sdb8"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【站立小孩-3】转身"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【站立小孩-3】走路"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_wae3q"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【胖小孩背着残疾小孩】-画画"
|
||||||
|
intro_loop = 2
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【胖小孩背着残疾小孩】-呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1yioc"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "【胖小孩背着残疾小孩】-正面抖肩"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "【胖小孩背着残疾小孩】-正面呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_iyt0p"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "红衣姑娘抬头"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "红衣姑娘呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_y85tj"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "院长翻书"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "院长呼吸"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_yvgum"]
|
||||||
|
script = ExtResource("9_lg0nw")
|
||||||
|
animation_intro = "院长抬头"
|
||||||
|
intro_loop = 1
|
||||||
|
animation_wait_time = 0.0
|
||||||
|
animation_next = "院长呼吸"
|
||||||
|
|
||||||
[node name="S06" type="Node2D"]
|
[node name="S06" type="Node2D"]
|
||||||
metadata/_edit_horizontal_guides_ = [158.0, 88.0]
|
metadata/_edit_horizontal_guides_ = [158.0, 88.0]
|
||||||
|
|
||||||
@ -92,67 +181,78 @@ position = Vector2(299, 42)
|
|||||||
one_shot = false
|
one_shot = false
|
||||||
freeze_time = 3.0
|
freeze_time = 3.0
|
||||||
hook_animation = "门口_观望"
|
hook_animation = "门口_观望"
|
||||||
|
hook_method = null
|
||||||
|
|
||||||
[node name="踢球男孩" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_erliv")]
|
[node name="踢球男孩" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_erliv")]
|
||||||
position = Vector2(535, -3)
|
position = Vector2(535, -3)
|
||||||
range_x = 450.0
|
range_x = 450.0
|
||||||
speed = 90.0
|
speed = 90.0
|
||||||
|
|
||||||
[node name="跷跷板" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="4"]
|
[node name="秋千" parent="Ground/DeployLayer" index="4" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1358.5, -0.5)
|
position = Vector2(1241, -1)
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
|
||||||
animation = &"跷跷板"
|
|
||||||
script = ExtResource("6_4o4lo")
|
|
||||||
|
|
||||||
[node name="秋千" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="5"]
|
|
||||||
position = Vector2(1241.5, -0.5)
|
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"秋千"
|
animation = &"秋千"
|
||||||
frame = 6
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_g8vrg"), SubResource("Resource_nivp4")])
|
||||||
frame_progress = 0.530616
|
|
||||||
script = ExtResource("6_4o4lo")
|
|
||||||
|
|
||||||
[node name="围墙_画画小女孩" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="6"]
|
[node name="跷跷板" parent="Ground/DeployLayer" index="5" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1593, 2)
|
position = Vector2(1358, 0)
|
||||||
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
|
animation = &"跷跷板"
|
||||||
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_g8vrg"), SubResource("Resource_nivp4")])
|
||||||
|
|
||||||
|
[node name="drawing_ambush" parent="Ground/DeployLayer" index="6" instance=ExtResource("11_tudob")]
|
||||||
|
position = Vector2(1615, 44)
|
||||||
|
one_shot = false
|
||||||
|
hook_method = "play_drawing"
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" parent="Ground/DeployLayer/drawing_ambush/Area2D" index="0"]
|
||||||
|
position = Vector2(13, 1)
|
||||||
|
shape = SubResource("RectangleShape2D_600pb")
|
||||||
|
|
||||||
|
[node name="drawing_kids" type="Node2D" parent="Ground/DeployLayer" index="7"]
|
||||||
|
position = Vector2(0, -1)
|
||||||
|
|
||||||
|
[node name="【画画小女孩】" parent="Ground/DeployLayer/drawing_kids" instance=ExtResource("9_on7ga")]
|
||||||
|
position = Vector2(1593, 3)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【画画小女孩】呼吸"
|
animation = &"【画画小女孩】呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_g8vrg"), SubResource("Resource_nivp4")])
|
||||||
|
|
||||||
[node name="围墙_画画男孩1" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="7"]
|
[node name="【画画男孩-1】" parent="Ground/DeployLayer/drawing_kids" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1638, 2)
|
position = Vector2(1638, 3)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【画画男孩-1】呼吸"
|
animation = &"【画画男孩-1】呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_yc62b")])
|
||||||
|
|
||||||
[node name="围墙_画画男孩2" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="8"]
|
[node name="【画画男孩-2】" parent="Ground/DeployLayer/drawing_kids" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1666, 2)
|
position = Vector2(1666, 2)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【画画男孩-2】呼吸"
|
animation = &"【画画男孩-2】呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_ls4y8")])
|
||||||
|
|
||||||
[node name="围墙_站立小孩1" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="9"]
|
[node name="围墙_站立小孩1" parent="Ground/DeployLayer" index="8" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1485, -6)
|
position = Vector2(1485, -6)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【站立小孩-1】侧面呼吸"
|
animation = &"【站立小孩-1】侧面呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_0muca")])
|
||||||
|
|
||||||
[node name="围墙_站立小孩2" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="10"]
|
[node name="围墙_站立小孩2" parent="Ground/DeployLayer" index="9" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1513, -5)
|
position = Vector2(1513, -6)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【站立小孩-2】呼吸"
|
animation = &"【站立小孩-2】呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_unrl6")])
|
||||||
|
|
||||||
[node name="围墙_站立小孩3" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="11"]
|
[node name="围墙_站立小孩3" parent="Ground/DeployLayer" index="10" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1535, -5)
|
position = Vector2(1535, -5)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【站立小孩-3】呼吸"
|
animation = &"【站立小孩-3】呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_7sdb8")])
|
||||||
|
|
||||||
[node name="围墙_胖小孩背着残疾小孩" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="12"]
|
[node name="围墙_胖小孩背着残疾小孩" parent="Ground/DeployLayer" index="11" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(1714, 6)
|
position = Vector2(1714, 6)
|
||||||
sprite_frames = ExtResource("7_dsj2r")
|
sprite_frames = ExtResource("7_dsj2r")
|
||||||
animation = &"【胖小孩背着残疾小孩】-呼吸"
|
animation = &"【胖小孩背着残疾小孩】-呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_wae3q"), SubResource("Resource_1yioc")])
|
||||||
|
|
||||||
[node name="PointLight2D" type="PointLight2D" parent="Ground/AmbientLayer" index="0"]
|
[node name="PointLight2D" type="PointLight2D" parent="Ground/AmbientLayer" index="0"]
|
||||||
energy = 0.6
|
energy = 0.6
|
||||||
@ -170,49 +270,38 @@ texture = ExtResource("4_dtycx")
|
|||||||
centered = false
|
centered = false
|
||||||
offset = Vector2(0, -153)
|
offset = Vector2(0, -153)
|
||||||
|
|
||||||
[node name="门口_中蓝衣小孩" type="AnimatedSprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="1"]
|
[node name="门口_中蓝衣小孩" parent="Ground/ParallaxForeground/BGParallaxLayer" index="1" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(377.5, -1.5)
|
position = Vector2(377, -1)
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"中蓝衣小孩呼吸"
|
animation = &"中蓝衣小孩呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
|
||||||
|
|
||||||
[node name="门口_右绿衣男孩" type="AnimatedSprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="2"]
|
[node name="门口_右绿衣男孩" parent="Ground/ParallaxForeground/BGParallaxLayer" index="2" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(408.5, 0.5)
|
position = Vector2(408, 1)
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"右绿衣男孩呼吸"
|
animation = &"右绿衣男孩呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
|
||||||
|
|
||||||
[node name="门口_左2黄衣男" type="AnimatedSprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="3"]
|
[node name="门口_左2黄衣男" parent="Ground/ParallaxForeground/BGParallaxLayer" index="3" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(269.5, -1.5)
|
position = Vector2(269, 0)
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"左2黄衣男呼吸"
|
animation = &"左2黄衣男呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
|
||||||
|
|
||||||
[node name="门口_左一绿衣男" type="AnimatedSprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="4"]
|
[node name="门口_左一绿衣男" parent="Ground/ParallaxForeground/BGParallaxLayer" index="4" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(426.5, -0.5)
|
position = Vector2(230, 37)
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"左一绿衣男呼吸"
|
animation = &"左一绿衣男呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
flip_h = true
|
||||||
|
|
||||||
[node name="门口_红衣姑娘" type="AnimatedSprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="5"]
|
[node name="门口_红衣姑娘" parent="Ground/ParallaxForeground/BGParallaxLayer" index="5" instance=ExtResource("9_on7ga")]
|
||||||
light_mask = 0
|
position = Vector2(333, 0)
|
||||||
position = Vector2(334, -2)
|
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"红衣姑娘呼吸"
|
animation = &"红衣姑娘呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_iyt0p")])
|
||||||
auto_checkout_dict = {
|
|
||||||
"红衣姑娘抬头": "红衣姑娘呼吸"
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="门口_院长" type="AnimatedSprite2D" parent="Ground/ParallaxForeground/BGParallaxLayer" index="6"]
|
[node name="门口_院长" parent="Ground/ParallaxForeground/BGParallaxLayer" index="6" instance=ExtResource("9_on7ga")]
|
||||||
position = Vector2(301.5, -1.5)
|
position = Vector2(301, -1)
|
||||||
sprite_frames = ExtResource("2_l4axy")
|
sprite_frames = ExtResource("2_l4axy")
|
||||||
animation = &"院长呼吸"
|
animation = &"院长呼吸"
|
||||||
script = ExtResource("6_4o4lo")
|
state_configs = Array[ExtResource("9_lg0nw")]([SubResource("Resource_y85tj"), SubResource("Resource_yvgum")])
|
||||||
auto_checkout_dict = {
|
|
||||||
"院长抬头": "院长呼吸",
|
|
||||||
"院长翻书": "院长呼吸"
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||||
texture = null
|
texture = null
|
||||||
@ -237,3 +326,4 @@ centered = false
|
|||||||
offset = Vector2(0, -159)
|
offset = Vector2(0, -159)
|
||||||
|
|
||||||
[editable path="Ground"]
|
[editable path="Ground"]
|
||||||
|
[editable path="Ground/DeployLayer/drawing_ambush"]
|
||||||
|
@ -37,6 +37,7 @@ dialogue = "c02"
|
|||||||
|
|
||||||
[node name="Ambush" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_vgxa0")]
|
[node name="Ambush" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_vgxa0")]
|
||||||
position = Vector2(135, 56)
|
position = Vector2(135, 56)
|
||||||
|
hook_method = null
|
||||||
|
|
||||||
[node name="MainPlayer" parent="Ground" index="5"]
|
[node name="MainPlayer" parent="Ground" index="5"]
|
||||||
position = Vector2(78, 88)
|
position = Vector2(78, 88)
|
||||||
|
@ -96,6 +96,17 @@ shape = SubResource("RectangleShape2D_vc6i4")
|
|||||||
[node name="MainPlayer" parent="Ground" index="5"]
|
[node name="MainPlayer" parent="Ground" index="5"]
|
||||||
position = Vector2(26, 98)
|
position = Vector2(26, 98)
|
||||||
|
|
||||||
|
[node name="CameraFocusMarker" parent="Ground" index="6"]
|
||||||
|
force_offset = Vector2(0, 0)
|
||||||
|
lock_horizontal = true
|
||||||
|
speed = 5.0
|
||||||
|
half_screen_size = Vector2(282, 120)
|
||||||
|
shaded_height = 38
|
||||||
|
shake_enabled = false
|
||||||
|
shake_strength = 2.0
|
||||||
|
shake_recovery_speed = 8.0
|
||||||
|
zoom_ratio = 1.0
|
||||||
|
|
||||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||||
texture = null
|
texture = null
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
extends AnimatedSprite2D
|
|
||||||
|
|
||||||
var animation_state_dict = {
|
|
||||||
}
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
if animation:
|
|
||||||
play(animation)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
extends AnimatedSprite2D
|
|
||||||
|
|
||||||
# from - to
|
|
||||||
@export var auto_checkout_dict = {}
|
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
if animation:
|
|
||||||
# 制造一点错差
|
|
||||||
frame = randi() % sprite_frames.get_frame_count(animation)
|
|
||||||
play()
|
|
||||||
animation_finished.connect(_on_animation_finished)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_animation_finished() -> void:
|
|
||||||
if auto_checkout_dict.has(animation):
|
|
||||||
var next_animation = auto_checkout_dict[animation]
|
|
||||||
if next_animation:
|
|
||||||
play(next_animation)
|
|
@ -1,6 +0,0 @@
|
|||||||
class_name StateActionConfigResource extends Resource
|
|
||||||
|
|
||||||
@export var action_name := ""
|
|
||||||
@export var animation_begin := ""
|
|
||||||
@export var animation_mid := ""
|
|
||||||
@export var animation_end := ""
|
|
Loading…
Reference in New Issue
Block a user