c01_s05_院长书房:资源与部署
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-爬行呼吸左1.png → asset/art/animation/c02_吕萍_爬行_idle_l/吕萍-爬行呼吸左1.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-爬行呼吸左2.png → asset/art/animation/c02_吕萍_爬行_idle_l/吕萍-爬行呼吸左2.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-爬行呼吸右1.png → asset/art/animation/c02_吕萍_爬行_idle_r/吕萍-爬行呼吸右1.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-爬行呼吸右2.png → asset/art/animation/c02_吕萍_爬行_idle_r/吕萍-爬行呼吸右2.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行1.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行1.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行2.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行2.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行3.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行3.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行4.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行4.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行5.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行5.png
Executable file → Normal file
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行6.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行6.png
Executable file → Normal file
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行7.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行7.png
Executable file → Normal file
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
0
asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行8.png → asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行8.png
Executable file → Normal file
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 853 KiB After Width: | Height: | Size: 853 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
BIN
asset/art/scene/c01/s05_院长房间/bg_背景.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
asset/art/scene/c01/s05_院长房间/e_座钟.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
asset/art/scene/c01/s05_院长房间/e_打开的门.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
asset/art/scene/c01/s05_院长房间/e_桌椅.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
asset/art/scene/c01/s05_院长房间/e_钢琴.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
asset/art/scene/c01/s05_院长房间/fg_前景.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
asset/art/scene/c01/s05_院长房间/全局参考.png
Normal file
After Width: | Height: | Size: 239 KiB |
@ -23,7 +23,7 @@
|
||||
"c02_吕萍_头痛蹲下": "",
|
||||
"c02_吕萍_柜前被吓到后退": "",
|
||||
"c02_吕萍_爬出洞口": "",
|
||||
"c02_吕萍_爬行_right": "laying_stay_l",
|
||||
"c02_吕萍_爬行_right": "",
|
||||
"c02_吕萍_看小猫玩具_right": "",
|
||||
"c02_吕萍_背靠起身": "",
|
||||
"c02_吕萍_蹲下来查看": "",
|
||||
@ -46,7 +46,10 @@
|
||||
"c02_王癞子_蹲着呼吸": "",
|
||||
"c02_瞎子_蹲着呼吸": "",
|
||||
"c02_门前弹珠": "",
|
||||
"c02_黑手_捂屏幕": ""
|
||||
"c02_黑手_捂屏幕": "",
|
||||
"c02_吕萍_爬行_idle_l": "",
|
||||
"c02_吕萍_爬行_idle_r": "",
|
||||
"c02_吕萍_爬行_left": ""
|
||||
},
|
||||
"mirror_mapping": {
|
||||
"c00_吕萍_idle_left": "",
|
||||
@ -72,7 +75,7 @@
|
||||
"c02_吕萍_头痛蹲下": "",
|
||||
"c02_吕萍_柜前被吓到后退": "",
|
||||
"c02_吕萍_爬出洞口": "",
|
||||
"c02_吕萍_爬行_right": "laying_moving_r",
|
||||
"c02_吕萍_爬行_right": "",
|
||||
"c02_吕萍_看小猫玩具_right": "",
|
||||
"c02_吕萍_背靠起身": "",
|
||||
"c02_吕萍_蹲下来查看": "",
|
||||
@ -95,7 +98,10 @@
|
||||
"c02_王癞子_蹲着呼吸": "",
|
||||
"c02_瞎子_蹲着呼吸": "",
|
||||
"c02_门前弹珠": "",
|
||||
"c02_黑手_捂屏幕": ""
|
||||
"c02_黑手_捂屏幕": "",
|
||||
"c02_吕萍_爬行_idle_l": "",
|
||||
"c02_吕萍_爬行_idle_r": "",
|
||||
"c02_吕萍_爬行_left": ""
|
||||
},
|
||||
"dirs": {
|
||||
"c00_吕萍_idle_left": {
|
||||
@ -695,17 +701,62 @@
|
||||
"10"
|
||||
]
|
||||
},
|
||||
"c02_吕萍_爬行_idle_l": {
|
||||
"path": "res://asset/art/animation/c02_吕萍_爬行_idle_l",
|
||||
"frames": {
|
||||
"1": "res://asset/art/animation/c02_吕萍_爬行_idle_l/吕萍-爬行呼吸左1.png",
|
||||
"2": "res://asset/art/animation/c02_吕萍_爬行_idle_l/吕萍-爬行呼吸左2.png"
|
||||
},
|
||||
"ids": [
|
||||
"1",
|
||||
"2"
|
||||
]
|
||||
},
|
||||
"c02_吕萍_爬行_idle_r": {
|
||||
"path": "res://asset/art/animation/c02_吕萍_爬行_idle_r",
|
||||
"frames": {
|
||||
"1": "res://asset/art/animation/c02_吕萍_爬行_idle_r/吕萍-爬行呼吸右1.png",
|
||||
"2": "res://asset/art/animation/c02_吕萍_爬行_idle_r/吕萍-爬行呼吸右2.png"
|
||||
},
|
||||
"ids": [
|
||||
"1",
|
||||
"2"
|
||||
]
|
||||
},
|
||||
"c02_吕萍_爬行_left": {
|
||||
"path": "res://asset/art/animation/c02_吕萍_爬行_left",
|
||||
"frames": {
|
||||
"1": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行1.png",
|
||||
"2": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行2.png",
|
||||
"3": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行3.png",
|
||||
"4": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行4.png",
|
||||
"5": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行5.png",
|
||||
"6": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行6.png",
|
||||
"7": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行7.png",
|
||||
"8": "res://asset/art/animation/c02_吕萍_爬行_left/吕萍-向左爬行8.png"
|
||||
},
|
||||
"ids": [
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8"
|
||||
]
|
||||
},
|
||||
"c02_吕萍_爬行_right": {
|
||||
"path": "res://asset/art/animation/c02_吕萍_爬行_right",
|
||||
"frames": {
|
||||
"1": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-爬行呼吸左1.png",
|
||||
"2": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-爬行呼吸左2.png",
|
||||
"3": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行3.png",
|
||||
"4": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行4.png",
|
||||
"5": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行5.png",
|
||||
"6": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行6.png",
|
||||
"7": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行7.png",
|
||||
"8": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向左爬行8.png"
|
||||
"1": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行1.png",
|
||||
"2": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行2.png",
|
||||
"3": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行3.png",
|
||||
"4": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行4.png",
|
||||
"5": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行5.png",
|
||||
"6": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行6.png",
|
||||
"7": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行7.png",
|
||||
"8": "res://asset/art/animation/c02_吕萍_爬行_right/吕萍-向右爬行8.png"
|
||||
},
|
||||
"ids": [
|
||||
"1",
|
||||
@ -1280,7 +1331,7 @@
|
||||
"c02_吕萍_头痛蹲下": "c02_吕萍_头痛蹲下",
|
||||
"c02_吕萍_柜前被吓到后退": "c02_吕萍_柜前被吓到后退",
|
||||
"c02_吕萍_爬出洞口": "c02_吕萍_爬出洞口",
|
||||
"c02_吕萍_爬行_right": "laying_moving_l",
|
||||
"c02_吕萍_爬行_right": "laying_moving_r",
|
||||
"c02_吕萍_看小猫玩具_right": "c02_吕萍_看小猫玩具_right",
|
||||
"c02_吕萍_背靠起身": "c02_吕萍_背靠起身",
|
||||
"c02_吕萍_蹲下来查看": "c02_吕萍_蹲下来查看",
|
||||
@ -1303,32 +1354,35 @@
|
||||
"c02_王癞子_蹲着呼吸": "c02_王癞子_蹲着呼吸",
|
||||
"c02_瞎子_蹲着呼吸": "c02_瞎子_蹲着呼吸",
|
||||
"c02_门前弹珠": "c02_门前弹珠",
|
||||
"c02_黑手_捂屏幕": "c02_黑手_捂屏幕"
|
||||
"c02_黑手_捂屏幕": "c02_黑手_捂屏幕",
|
||||
"c02_吕萍_爬行_idle_l": "laying_stay_l",
|
||||
"c02_吕萍_爬行_idle_r": "laying_stay_r",
|
||||
"c02_吕萍_爬行_left": "laying_moving_l"
|
||||
},
|
||||
"frames_per_second": {
|
||||
"c00_吕萍_idle_left": 2,
|
||||
"c00_吕萍_idle_right": 2,
|
||||
"c00_吕萍_jogging_left": 7,
|
||||
"c00_吕萍_jogging_right": 7,
|
||||
"c00_吕萍_running_left": 8,
|
||||
"c00_吕萍_running_right": 8,
|
||||
"c00_吕萍_walking_left": 6,
|
||||
"c00_吕萍_walking_right": 6,
|
||||
"c00_吕萍_记笔记_right": 6,
|
||||
"c00_吕萍_running_left": 10,
|
||||
"c00_吕萍_running_right": 10,
|
||||
"c00_吕萍_walking_left": 8,
|
||||
"c00_吕萍_walking_right": 8,
|
||||
"c00_吕萍_记笔记_right": 8,
|
||||
"c00_吕萍带小猫_idle_left": 2,
|
||||
"c00_吕萍带小猫_idle_right": 2,
|
||||
"c00_吕萍带小猫_walking_left": 6,
|
||||
"c00_吕萍带小猫_walking_right": 6,
|
||||
"c00_吕萍带小猫_walking_left": 8,
|
||||
"c00_吕萍带小猫_walking_right": 8,
|
||||
"c01_捡球男孩_关键帧": 8,
|
||||
"c01_红光鬼差_idle": 6,
|
||||
"c01_红光鬼差_walking": 6,
|
||||
"c01_车夫_idle": 2,
|
||||
"c01_车夫_running": 7,
|
||||
"c02_吕萍_匍匐起身蹲着窥视": 6,
|
||||
"c02_吕萍_坐着站起来": 6,
|
||||
"c02_吕萍_头痛蹲下": 6,
|
||||
"c01_车夫_running": 8,
|
||||
"c02_吕萍_匍匐起身蹲着窥视": 7,
|
||||
"c02_吕萍_坐着站起来": 8,
|
||||
"c02_吕萍_头痛蹲下": 8,
|
||||
"c02_吕萍_柜前被吓到后退": 6,
|
||||
"c02_吕萍_爬出洞口": 6,
|
||||
"c02_吕萍_爬出洞口": 8,
|
||||
"c02_吕萍_爬行_right": 6,
|
||||
"c02_吕萍_看小猫玩具_right": 6,
|
||||
"c02_吕萍_背靠起身": 6,
|
||||
@ -1352,6 +1406,9 @@
|
||||
"c02_王癞子_蹲着呼吸": 2,
|
||||
"c02_瞎子_蹲着呼吸": 2,
|
||||
"c02_门前弹珠": 10,
|
||||
"c02_黑手_捂屏幕": 9
|
||||
"c02_黑手_捂屏幕": 9,
|
||||
"c02_吕萍_爬行_idle_l": 2,
|
||||
"c02_吕萍_爬行_idle_r": 2,
|
||||
"c02_吕萍_爬行_left": 6
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ const FOOTSTEP_AUDIO = {
|
||||
|
||||
# @export var scene_name: String = ""
|
||||
|
||||
# @export var boarder: PackedVector2Array
|
||||
@export_group("Player", "player_")
|
||||
@export var player_y_fixed := true
|
||||
@export var player_y := 45
|
||||
|
@ -27,26 +27,18 @@ func freeze_player(lock_time: float, animation := ""):
|
||||
player.freeze_player(lock_time, animation)
|
||||
|
||||
|
||||
func set_camera_boundary(size: Vector2) -> void:
|
||||
func set_camera_boundary(rect: Rect2) -> void:
|
||||
var camera_marker = CameraFocusMarker
|
||||
camera_marker.limit_left = 0
|
||||
camera_marker.limit_right = size.x
|
||||
camera_marker.limit_top = -size.y / 2.0 - 38
|
||||
camera_marker.limit_bottom = size.y / 2.0 + 38
|
||||
if GlobalConfig.DEBUG:
|
||||
print("set camera boundary:", size)
|
||||
else:
|
||||
printerr("camera_marker node not found")
|
||||
camera_marker.limit_left = rect.position.x
|
||||
camera_marker.limit_right = rect.position.x + rect.size.x
|
||||
camera_marker.limit_top = rect.position.y
|
||||
camera_marker.limit_bottom = rect.position.y + rect.size.y
|
||||
|
||||
|
||||
func set_player_boundary(size: Vector2) -> void:
|
||||
func set_player_boundary(rect: Rect2) -> void:
|
||||
var player = get_player()
|
||||
if player:
|
||||
size.x = size.x - 30
|
||||
var rect = Rect2(Vector2(15, -size.y / 2), size)
|
||||
player.player_movement_rect = rect
|
||||
if GlobalConfig.DEBUG:
|
||||
print("set player boundary:", rect)
|
||||
else:
|
||||
printerr("Player node not found")
|
||||
|
||||
@ -103,7 +95,7 @@ func focus_nodepath(node_path: NodePath) -> void:
|
||||
var camera_remote_transformer: RemoteTransform2D
|
||||
|
||||
|
||||
func focus_node(node: Node2D) -> void:
|
||||
func focus_node(node: CanvasItem) -> void:
|
||||
var rt := node.get_node_or_null("./camera_remote_transformer") as RemoteTransform2D
|
||||
if rt:
|
||||
if camera_remote_transformer and rt != camera_remote_transformer:
|
||||
@ -138,7 +130,6 @@ func focus_player() -> void:
|
||||
func focus_player_and_reset_zoom(duration := 1.0) -> void:
|
||||
CameraFocusMarker.tween_zoom(1.0, duration).tween_callback(focus_player)
|
||||
|
||||
|
||||
# func player_moved_delta_x(delta_x: float) -> void:
|
||||
# # fog effect offset
|
||||
# var fog = get_node_or_null("/root/Main/ShadingLayer/Fog")
|
||||
|
@ -139,10 +139,9 @@ locale/translations_pot_files=PackedStringArray("res://asset/dialogue/item_descr
|
||||
[layer_names]
|
||||
|
||||
2d_physics/layer_1="player"
|
||||
2d_physics/layer_2="wall"
|
||||
2d_physics/layer_2="ground_boarder"
|
||||
2d_physics/layer_3="interactable"
|
||||
2d_physics/layer_4="hud_mouse"
|
||||
2d_physics/layer_5="dragable"
|
||||
|
||||
[rendering]
|
||||
|
||||
|
@ -11,10 +11,12 @@ extends Marker2D
|
||||
@export var shake_strength := 2.0
|
||||
@export var shake_recovery_speed := 8.0
|
||||
@export_group("Limit", "limit_")
|
||||
@export var limit_left := 0
|
||||
@export var limit_right := 564
|
||||
@export var limit_top := -158
|
||||
@export var limit_bottom := 158
|
||||
@export var limit_left := 0.0
|
||||
@export var limit_right := 564.0
|
||||
# @export var limit_top := -158.0
|
||||
# @export var limit_bottom := 158.0
|
||||
@export var limit_top := 0
|
||||
@export var limit_bottom := 316.0
|
||||
|
||||
@onready var target = %Target as Node2D
|
||||
# @onready var camera = %MainCamera as MainCamera
|
||||
@ -56,5 +58,13 @@ func tween_zoom(ratio: float, duration := 1.0) -> Tween:
|
||||
if zoom_tween and zoom_tween.is_running():
|
||||
zoom_tween.kill()
|
||||
zoom_tween = create_tween()
|
||||
zoom_tween.tween_property(self, "zoom_ratio", ratio, duration).set_trans(Tween.TRANS_CUBIC).set_ease(Tween.EASE_IN_OUT)
|
||||
if duration <= 0.0:
|
||||
zoom_ratio = ratio
|
||||
else:
|
||||
(
|
||||
zoom_tween
|
||||
. tween_property(self, "zoom_ratio", ratio, duration)
|
||||
. set_trans(Tween.TRANS_CUBIC)
|
||||
. set_ease(Tween.EASE_IN_OUT)
|
||||
)
|
||||
return zoom_tween
|
||||
|
@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://61pis75a8fdq"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://61pis75a8fdq"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/entity/portal.gd" id="1_jyh6v"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcafeofupga6j" path="res://asset/art/scene/c02/s06_院子回忆版/e_1014 开门.png" id="1_ynrqg"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbi1whlvfrt5k" path="res://asset/art/ui/action_mark/传送.png" id="2_ay30q"]
|
||||
[ext_resource type="PackedScene" uid="uid://c85t6stvytvjn" path="res://scene/entity/ux/sfx.tscn" id="3_6khux"]
|
||||
[ext_resource type="Script" path="res://scene/entity/ux/sign.gd" id="4_lu5q5"]
|
||||
@ -11,17 +10,16 @@ resource_local_to_scene = true
|
||||
size = Vector2(45, 130)
|
||||
|
||||
[node name="Portal" type="Sprite2D"]
|
||||
texture = ExtResource("1_ynrqg")
|
||||
script = ExtResource("1_jyh6v")
|
||||
|
||||
[node name="Sfx" parent="." instance=ExtResource("3_6khux")]
|
||||
unique_name_in_owner = true
|
||||
file = "开门.mp3"
|
||||
file = "页面转换声.wav"
|
||||
|
||||
[node name="Sign" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
position = Vector2(0, -73)
|
||||
position = Vector2(0, -51)
|
||||
scale = Vector2(0.05, 0.05)
|
||||
texture = ExtResource("2_ay30q")
|
||||
script = ExtResource("4_lu5q5")
|
||||
|
@ -22,7 +22,7 @@ func _ready() -> void:
|
||||
|
||||
func _reload_sfx():
|
||||
if file and dir:
|
||||
print("reload sfx", sfx_root_path + dir + "/" + file)
|
||||
# print("reload sfx", sfx_root_path + dir + "/" + file)
|
||||
sfx = load(sfx_root_path + dir + "/" + file) as AudioStream
|
||||
else:
|
||||
sfx = null
|
||||
|
@ -2,6 +2,10 @@
|
||||
class_name Ground2D extends Node2D
|
||||
|
||||
@export var scene_config: SceneConfig
|
||||
# @export var build_boarder := false:
|
||||
# set(new_val):
|
||||
# build_boarder = false
|
||||
# _build_boarder()
|
||||
@export var reload := false:
|
||||
set(new_val):
|
||||
reload = false
|
||||
@ -12,6 +16,12 @@ class_name Ground2D extends Node2D
|
||||
|
||||
var footstep_audio = RandomAudioStreamPlayer.new()
|
||||
|
||||
|
||||
func play_footstep_sound() -> void:
|
||||
if not footstep_audio.audio_collections.is_empty():
|
||||
footstep_audio.play_random()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
foreground.layer = GlobalConfig.CANVAS_LAYER_FG
|
||||
# %ColorRectTop.visible = true
|
||||
@ -29,10 +39,25 @@ func load_config():
|
||||
if type != "none":
|
||||
var audio = SceneConfig.FOOTSTEP_AUDIO[type] as AudioStreamCollection
|
||||
footstep_audio.audio_collections.append(audio)
|
||||
# # collision boarder
|
||||
# if scene_config.boarder:
|
||||
# _load_collision_boarder()
|
||||
# light color
|
||||
# directional_light.color = scene_config.light_color
|
||||
|
||||
# func _build_boarder() -> void:
|
||||
# if scene_config and $BGSprite2D and $BGSprite2D.texture:
|
||||
# var image = $BGSprite2D.texture.get_image()
|
||||
# var origin = $BGSprite2D.position + $BGSprite2D.offset
|
||||
# var points = PackedVector2Array()
|
||||
# for i in range(image.get_width()):
|
||||
# for j in range(image.get_height()):
|
||||
# if image.get_pixel(i, j).a > 0:
|
||||
# points.append(origin + Vector2(i, j))
|
||||
# var boarder = Geometry2D.convex_hull(points)
|
||||
# scene_config.boarder = boarder
|
||||
# _load_collision_boarder()
|
||||
|
||||
func play_footstep_sound() -> void:
|
||||
if not footstep_audio.audio_collections.is_empty():
|
||||
footstep_audio.play_random()
|
||||
# func _load_collision_boarder() -> void:
|
||||
# if scene_config and scene_config.boarder and $StaticBody2D/CollisionPolygon2D:
|
||||
# $StaticBody2D/CollisionPolygon2D.polygon = scene_config.boarder
|
||||
|
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dayyx4jerj7io"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dayyx4jerj7io"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/ground/ground.gd" id="1_0vrlo"]
|
||||
[ext_resource type="Script" path="res://config/deploy/scene_config.gd" id="2_bx7rv"]
|
||||
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="3_t73yw"]
|
||||
[ext_resource type="Texture2D" uid="uid://by8h2yuqve7fw" path="res://asset/art/scene/c02/s06_院子回忆版/fg_有人.png" id="5_i5hii"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6ux50"]
|
||||
@ -23,14 +24,34 @@ func _ready() -> void:
|
||||
script = ExtResource("1_0vrlo")
|
||||
scene_config = SubResource("Resource_6ux50")
|
||||
|
||||
[node name="BGColorRect" type="ColorRect" parent="."]
|
||||
custom_minimum_size = Vector2(664, 318)
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -50.0
|
||||
offset_top = -159.0
|
||||
offset_right = 614.0
|
||||
offset_bottom = 159.0
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="BGSprite2D" type="Sprite2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
centered = false
|
||||
offset = Vector2(0, -119)
|
||||
offset = Vector2(0, -120)
|
||||
|
||||
[node name="DeployLayer" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="PortalLeft" parent="DeployLayer" instance=ExtResource("3_t73yw")]
|
||||
position = Vector2(26, -1)
|
||||
|
||||
[node name="PortalRight" parent="DeployLayer" instance=ExtResource("3_t73yw")]
|
||||
position = Vector2(530, 0)
|
||||
portal_name = "right"
|
||||
|
||||
[node name="AmbientLayer" type="Node2D" parent="."]
|
||||
|
||||
[node name="ParallaxForeground" type="ParallaxBackground" parent="."]
|
||||
|
@ -122,9 +122,22 @@ func _do_transition(scene: Node2D):
|
||||
|
||||
func _set_camera_and_player_boundary():
|
||||
var bg = ground.get_node("BGSprite2D")
|
||||
# set current_boarder by bg size
|
||||
if bg.texture and not Engine.is_editor_hint():
|
||||
SceneManager.set_camera_boundary(bg.texture.get_size())
|
||||
SceneManager.set_player_boundary(bg.texture.get_size())
|
||||
var size = bg.texture.get_size()
|
||||
# screen min height is 316px
|
||||
var up_left = Vector2(0, -size.y / 2.0)
|
||||
# camera rect
|
||||
var camera_size = Vector2(max(564.0, size.x), max(size.y, 316.0))
|
||||
var camera_rect = Rect2(up_left, camera_size)
|
||||
# player rect should be set centered, with 30px x padding
|
||||
size.x -= 36.0
|
||||
up_left.x = bg.position.x + 18.0
|
||||
var player_rect = Rect2(up_left, size)
|
||||
SceneManager.set_camera_boundary(camera_rect)
|
||||
SceneManager.set_player_boundary(player_rect)
|
||||
if GlobalConfig.DEBUG:
|
||||
print("_set_camera_and_player_boundary:", camera_rect, player_rect)
|
||||
|
||||
|
||||
func _update_archive():
|
||||
|
61
scene/ground/scene/c01/s05_院长房间.tscn
Normal file
@ -0,0 +1,61 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dlx5xxbg53rb8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_ff4yb"]
|
||||
[ext_resource type="Script" path="res://config/deploy/scene_config.gd" id="2_ve5ly"]
|
||||
[ext_resource type="Texture2D" uid="uid://dkufmwg07maun" path="res://asset/art/scene/c01/s05_院长房间/全局参考.png" id="3_7u4bh"]
|
||||
[ext_resource type="Texture2D" uid="uid://difymnwnet6lk" path="res://asset/art/scene/c01/s05_院长房间/bg_背景.png" id="3_f4ne6"]
|
||||
[ext_resource type="Texture2D" uid="uid://bp2r4s6v6ag2f" path="res://asset/art/scene/c01/s05_院长房间/fg_前景.png" id="3_vmr0f"]
|
||||
[ext_resource type="Texture2D" uid="uid://bkbr5ubkif1e6" path="res://asset/art/scene/c01/s05_院长房间/e_打开的门.png" id="5_cddn7"]
|
||||
[ext_resource type="PackedScene" uid="uid://ci5anaxsa1apl" path="res://scene/entity/local_inspectable.tscn" id="6_v72k7"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpht56skg054p" path="res://asset/art/scene/c01/s05_院长房间/e_座钟.png" id="7_3tetc"]
|
||||
[ext_resource type="Texture2D" uid="uid://bt17wvt5nw6a7" path="res://asset/art/scene/c01/s05_院长房间/e_钢琴.png" id="8_mnduo"]
|
||||
[ext_resource type="Texture2D" uid="uid://iteaoon750bx" path="res://asset/art/scene/c01/s05_院长房间/e_桌椅.png" id="9_x837o"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6jwab"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("2_ve5ly")
|
||||
player_y_fixed = true
|
||||
player_y = 45
|
||||
footstep_type = "concrete"
|
||||
bgm = ""
|
||||
|
||||
[node name="S05院长房间" type="Node2D"]
|
||||
|
||||
[node name="Ground" parent="." instance=ExtResource("1_ff4yb")]
|
||||
scene_config = SubResource("Resource_6jwab")
|
||||
|
||||
[node name="BGSprite2D" parent="Ground" index="1"]
|
||||
position = Vector2(45, -38)
|
||||
texture = ExtResource("3_f4ne6")
|
||||
|
||||
[node name="PortalLeft" parent="Ground/DeployLayer" index="0"]
|
||||
position = Vector2(90, 11)
|
||||
|
||||
[node name="PortalRight" parent="Ground/DeployLayer" index="1"]
|
||||
position = Vector2(473, 19)
|
||||
texture = ExtResource("5_cddn7")
|
||||
|
||||
[node name="座钟" parent="Ground/DeployLayer" index="2" instance=ExtResource("6_v72k7")]
|
||||
position = Vector2(316, 26)
|
||||
texture = ExtResource("7_3tetc")
|
||||
|
||||
[node name="钢琴" parent="Ground/DeployLayer" index="3" instance=ExtResource("6_v72k7")]
|
||||
position = Vector2(232, 57)
|
||||
texture = ExtResource("8_mnduo")
|
||||
|
||||
[node name="桌椅" type="Sprite2D" parent="Ground/DeployLayer" index="4"]
|
||||
position = Vector2(384, 52)
|
||||
texture = ExtResource("9_x837o")
|
||||
|
||||
[node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"]
|
||||
position = Vector2(62, 35)
|
||||
texture = ExtResource("3_vmr0f")
|
||||
|
||||
[node name="参考" type="Sprite2D" parent="Ground"]
|
||||
visible = false
|
||||
modulate = Color(1, 1, 1, 0.219608)
|
||||
position = Vector2(276, 2)
|
||||
scale = Vector2(0.26, 0.26)
|
||||
texture = ExtResource("3_7u4bh")
|
||||
|
||||
[editable path="Ground"]
|
@ -1,14 +1,13 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://e381spnutx62"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://e381spnutx62"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_klnwh"]
|
||||
[ext_resource type="Script" path="res://config/deploy/scene_config.gd" id="2_kijni"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sofmhrl358m" path="res://scene/entity/npc.tscn" id="2_upqk5"]
|
||||
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_heu4h"]
|
||||
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_eejqb"]
|
||||
[ext_resource type="PackedScene" uid="uid://wyj4qdjyn4ql" path="res://scene/entity/old/inspectable.tscn" id="5_pirce"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="6_fiskb"]
|
||||
[ext_resource type="PackedScene" uid="uid://bj4ufua0b0k34" path="res://scene/entity/hd_entity.tscn" id="7_l4pco"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0gti8fx40hph" path="res://asset/art/scene/c01/s04/e_树.png" id="8_6dlbe"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0gti8fx40hph" path="res://asset/art/scene/c01/s04_旧版序章/e_树.png" id="8_6dlbe"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_dcaa4"]
|
||||
resource_local_to_scene = true
|
||||
@ -30,24 +29,23 @@ position = Vector2(465, 23)
|
||||
position = Vector2(268, -36)
|
||||
notes = Array[String](["(门牌号: 1012)", "(似乎是用血来写的)"])
|
||||
|
||||
[node name="Portal" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_eejqb")]
|
||||
position = Vector2(99, 9)
|
||||
scale = Vector2(1.02941, 1.06667)
|
||||
portal_name = "right"
|
||||
target_scene = "c02_s01"
|
||||
target_portal = "left"
|
||||
|
||||
[node name="Inspectable" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_pirce")]
|
||||
[node name="Inspectable" parent="Ground/DeployLayer" index="2" instance=ExtResource("5_pirce")]
|
||||
position = Vector2(376, 36)
|
||||
|
||||
[node name="Ambush" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_fiskb")]
|
||||
[node name="Ambush" parent="Ground/DeployLayer" index="3" instance=ExtResource("6_fiskb")]
|
||||
position = Vector2(567, 28)
|
||||
hook_cg = "c02_胖子说话"
|
||||
|
||||
[node name="HdEntity" parent="Ground/DeployLayer" index="5" node_paths=PackedStringArray("sprite_ref") instance=ExtResource("7_l4pco")]
|
||||
[node name="HdEntity" parent="Ground/DeployLayer" index="4" node_paths=PackedStringArray("sprite_ref") instance=ExtResource("7_l4pco")]
|
||||
position = Vector2(259, 52)
|
||||
sprite_name = "tree"
|
||||
texture = ExtResource("8_6dlbe")
|
||||
sprite_ref = NodePath("../../SubViewportContainer/SubViewport/HdLayer/tree")
|
||||
|
||||
[node name="PortalLeft" parent="Ground/DeployLayer" index="5"]
|
||||
target_portal = "right"
|
||||
|
||||
[node name="PortalRight" parent="Ground/DeployLayer" index="6"]
|
||||
target_portal = "left"
|
||||
|
||||
[editable path="Ground"]
|
||||
|
@ -1,10 +1,9 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bbs7yy5aofw1v"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bbs7yy5aofw1v"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_gdcov"]
|
||||
[ext_resource type="Script" path="res://config/deploy/scene_config.gd" id="2_j6mie"]
|
||||
[ext_resource type="Texture2D" uid="uid://kc4726andgy2" path="res://asset/art/scene/c02/s01_街道/bg_公寓入口.png" id="2_ni1a4"]
|
||||
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_6lnxd"]
|
||||
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_i5pa0"]
|
||||
[ext_resource type="PackedScene" uid="uid://wyj4qdjyn4ql" path="res://scene/entity/old/inspectable.tscn" id="5_g5fsn"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="6_vgxa0"]
|
||||
|
||||
@ -16,10 +15,6 @@ player_y = 45
|
||||
footstep_type = "concrete"
|
||||
bgm = ""
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dmp2c"]
|
||||
resource_local_to_scene = true
|
||||
size = Vector2(45, 130)
|
||||
|
||||
[node name="S01" type="Node2D"]
|
||||
|
||||
[node name="Ground" parent="." instance=ExtResource("1_gdcov")]
|
||||
@ -28,28 +23,17 @@ scene_config = SubResource("Resource_p1xa1")
|
||||
[node name="BGSprite2D" parent="Ground" index="0"]
|
||||
texture = ExtResource("2_ni1a4")
|
||||
|
||||
[node name="Note" parent="Ground/DeployLayer" index="0" instance=ExtResource("3_6lnxd")]
|
||||
position = Vector2(250, -22)
|
||||
notes = Array[String](["(似乎是一张寻人启示)", "(脸的部分被撕掉了,打不开)"])
|
||||
[node name="PortalLeft" parent="Ground/DeployLayer" index="0"]
|
||||
position = Vector2(78, 27)
|
||||
|
||||
[node name="PortalL" parent="Ground/DeployLayer" index="1" instance=ExtResource("4_i5pa0")]
|
||||
position = Vector2(68, 23)
|
||||
scale = Vector2(1.02941, 1.06667)
|
||||
texture = null
|
||||
|
||||
[node name="Portal" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_i5pa0")]
|
||||
position = Vector2(400, 13)
|
||||
scale = Vector2(1.02941, 1.06667)
|
||||
texture = null
|
||||
portal_name = "1"
|
||||
[node name="PortalRight" parent="Ground/DeployLayer" index="1"]
|
||||
position = Vector2(392, 2)
|
||||
target_scene = "c02_s02"
|
||||
target_portal = "left"
|
||||
|
||||
[node name="Sfx" parent="Ground/DeployLayer/Portal" index="0"]
|
||||
file = "页面转换声.wav"
|
||||
|
||||
[node name="CollisionShape2D" parent="Ground/DeployLayer/Portal/Area2D" index="0"]
|
||||
shape = SubResource("RectangleShape2D_dmp2c")
|
||||
[node name="Note" parent="Ground/DeployLayer" index="2" instance=ExtResource("3_6lnxd")]
|
||||
position = Vector2(250, -22)
|
||||
notes = Array[String](["(似乎是一张寻人启示)", "(脸的部分被撕掉了,打不开)"])
|
||||
|
||||
[node name="Inspectable" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_g5fsn")]
|
||||
position = Vector2(311, -7)
|
||||
@ -61,4 +45,3 @@ position = Vector2(135, 56)
|
||||
texture = null
|
||||
|
||||
[editable path="Ground"]
|
||||
[editable path="Ground/DeployLayer/Portal"]
|
||||
|
@ -1,17 +1,16 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://brck77w81fhvc"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://brck77w81fhvc"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_wrr6r"]
|
||||
[ext_resource type="Script" path="res://config/deploy/scene_config.gd" id="2_757mj"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4647gof464ws" path="res://asset/art/scene/c02/s02_走道/bg_过道.png" id="2_cn1s8"]
|
||||
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_fy0o1"]
|
||||
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_vwh5u"]
|
||||
[ext_resource type="PackedScene" uid="uid://wyj4qdjyn4ql" path="res://scene/entity/old/inspectable.tscn" id="5_nhtbp"]
|
||||
[ext_resource type="Texture2D" uid="uid://do8quqgkrwahj" path="res://asset/art/scene/c02/s02_走道/ux_进门鼠疫海报wz.png" id="6_4pcq0"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="6_70vqn"]
|
||||
[ext_resource type="Texture2D" uid="uid://ds4yw1wqelhm1" path="res://asset/art/scene/c02/s02_走道/ux_进门鼠疫海报yz.png" id="7_wdwbi"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd0sn5e4hwq5m" path="res://asset/art/scene/c02/s02_走道/e_纸人.png" id="7_xsghn"]
|
||||
[ext_resource type="PackedScene" uid="uid://bj4ufua0b0k34" path="res://scene/entity/hd_entity.tscn" id="10_3c313"]
|
||||
[ext_resource type="Texture2D" uid="uid://dtk3c3uqhn8ue" path="res://asset/art/scene/c01/s04/e_轿车.png" id="11_x0h3x"]
|
||||
[ext_resource type="Texture2D" uid="uid://dtk3c3uqhn8ue" path="res://asset/art/scene/c01/s04_旧版序章/e_轿车.png" id="11_x0h3x"]
|
||||
[ext_resource type="PackedScene" uid="uid://ci5anaxsa1apl" path="res://scene/entity/local_inspectable.tscn" id="12_0fckv"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hd50m"]
|
||||
@ -22,10 +21,6 @@ player_y = 45
|
||||
footstep_type = "concrete"
|
||||
bgm = ""
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_vj0ag"]
|
||||
resource_local_to_scene = true
|
||||
size = Vector2(45, 130)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0xrg2"]
|
||||
size = Vector2(40, 150)
|
||||
|
||||
@ -41,28 +36,17 @@ scene_config = SubResource("Resource_hd50m")
|
||||
[node name="BGSprite2D" parent="Ground" index="0"]
|
||||
texture = ExtResource("2_cn1s8")
|
||||
|
||||
[node name="几张卫生宣传画" parent="Ground/DeployLayer" index="0" instance=ExtResource("3_fy0o1")]
|
||||
position = Vector2(275, -30)
|
||||
notes = Array[String](["(几张卫生宣传画)"])
|
||||
[node name="PortalLeft" parent="Ground/DeployLayer" index="0"]
|
||||
position = Vector2(24, 1)
|
||||
|
||||
[node name="Portal" parent="Ground/DeployLayer" index="1" instance=ExtResource("4_vwh5u")]
|
||||
position = Vector2(18, 54)
|
||||
scale = Vector2(1.02941, 1.06667)
|
||||
texture = null
|
||||
target_scene = "c02_s01"
|
||||
|
||||
[node name="Portal2" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_vwh5u")]
|
||||
position = Vector2(684, 34)
|
||||
texture = null
|
||||
portal_name = "right"
|
||||
[node name="PortalRight" parent="Ground/DeployLayer" index="1"]
|
||||
position = Vector2(676, 3)
|
||||
target_scene = "c02_s03"
|
||||
target_portal = "left"
|
||||
|
||||
[node name="Sfx" parent="Ground/DeployLayer/Portal2" index="0"]
|
||||
file = "页面转换声.wav"
|
||||
|
||||
[node name="CollisionShape2D" parent="Ground/DeployLayer/Portal2/Area2D" index="0"]
|
||||
shape = SubResource("RectangleShape2D_vj0ag")
|
||||
[node name="几张卫生宣传画" parent="Ground/DeployLayer" index="2" instance=ExtResource("3_fy0o1")]
|
||||
position = Vector2(275, -30)
|
||||
notes = Array[String](["(几张卫生宣传画)"])
|
||||
|
||||
[node name="鼠疫海报" parent="Ground/DeployLayer" index="3" instance=ExtResource("5_nhtbp")]
|
||||
position = Vector2(441, -20)
|
||||
@ -118,5 +102,4 @@ inspection_note = "据闻奉贤县分水墩又有七人染受鼠疫,病状可
|
||||
texture = null
|
||||
|
||||
[editable path="Ground"]
|
||||
[editable path="Ground/DeployLayer/Portal2"]
|
||||
[editable path="Ground/DeployLayer/HdEntity"]
|
||||
|
@ -1,11 +1,10 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://djc2uaefhmu7"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://djc2uaefhmu7"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_lheeb"]
|
||||
[ext_resource type="PackedScene" uid="uid://0sofmhrl358m" path="res://scene/entity/npc.tscn" id="2_r5smg"]
|
||||
[ext_resource type="Script" path="res://config/deploy/scene_config.gd" id="2_uifea"]
|
||||
[ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="3_6x7xl"]
|
||||
[ext_resource type="Texture2D" uid="uid://bb3f72fla7mvs" path="res://asset/art/scene/c02/s03_院子切换/bg_院子1楼(黄昏无人).png" id="3_78bcp"]
|
||||
[ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="4_gvtrn"]
|
||||
[ext_resource type="Texture2D" uid="uid://dqsl8rcues8hs" path="res://asset/art/scene/c02/s03_院子切换/n_院子1楼(黄昏无人).png" id="4_nef6w"]
|
||||
[ext_resource type="PackedScene" uid="uid://wyj4qdjyn4ql" path="res://scene/entity/old/inspectable.tscn" id="5_0xh53"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnf3lkcbpx1ar" path="res://scene/entity/ambush.tscn" id="6_gg4jv"]
|
||||
@ -26,10 +25,6 @@ bgm = ""
|
||||
diffuse_texture = ExtResource("3_78bcp")
|
||||
normal_texture = ExtResource("4_nef6w")
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ik5u6"]
|
||||
resource_local_to_scene = true
|
||||
size = Vector2(45, 130)
|
||||
|
||||
[node name="S03" type="Node2D"]
|
||||
|
||||
[node name="Ground" parent="." instance=ExtResource("1_lheeb")]
|
||||
@ -38,32 +33,19 @@ scene_config = SubResource("Resource_vdo00")
|
||||
[node name="BGSprite2D" parent="Ground" index="0"]
|
||||
texture = SubResource("CanvasTexture_41q0k")
|
||||
|
||||
[node name="Npc" parent="Ground/DeployLayer" index="0" instance=ExtResource("2_r5smg")]
|
||||
position = Vector2(465, 23)
|
||||
|
||||
[node name="Note" parent="Ground/DeployLayer" index="1" instance=ExtResource("3_6x7xl")]
|
||||
position = Vector2(268, -36)
|
||||
notes = Array[String](["(门牌号: 1012)", "(似乎是用血来写的)"])
|
||||
|
||||
[node name="Portal" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_gvtrn")]
|
||||
position = Vector2(19, 21)
|
||||
scale = Vector2(1.02941, 1.06667)
|
||||
texture = null
|
||||
[node name="PortalLeft" parent="Ground/DeployLayer" index="0"]
|
||||
target_scene = "c02_s02"
|
||||
target_portal = "right"
|
||||
|
||||
[node name="Sfx" parent="Ground/DeployLayer/Portal" index="0"]
|
||||
file = "页面转换声.wav"
|
||||
[node name="PortalRight" parent="Ground/DeployLayer" index="1"]
|
||||
visible = false
|
||||
|
||||
[node name="CollisionShape2D" parent="Ground/DeployLayer/Portal/Area2D" index="0"]
|
||||
shape = SubResource("RectangleShape2D_ik5u6")
|
||||
[node name="Npc" parent="Ground/DeployLayer" index="2" instance=ExtResource("2_r5smg")]
|
||||
position = Vector2(465, 23)
|
||||
|
||||
[node name="Portal2" parent="Ground/DeployLayer" index="3" instance=ExtResource("4_gvtrn")]
|
||||
position = Vector2(192, 8)
|
||||
scale = Vector2(1.02941, 1.06667)
|
||||
portal_name = "1"
|
||||
target_scene = "c02_s03"
|
||||
target_portal = "left"
|
||||
[node name="Note" parent="Ground/DeployLayer" index="3" instance=ExtResource("3_6x7xl")]
|
||||
position = Vector2(268, -36)
|
||||
notes = Array[String](["(门牌号: 1012)", "(似乎是用血来写的)"])
|
||||
|
||||
[node name="Inspectable" parent="Ground/DeployLayer" index="4" instance=ExtResource("5_0xh53")]
|
||||
position = Vector2(376, 36)
|
||||
@ -74,6 +56,7 @@ hook_cg = "c02_胖子说话"
|
||||
|
||||
[node name="Interactable" parent="Ground/DeployLayer" index="6" instance=ExtResource("8_vdelk")]
|
||||
position = Vector2(1072, 22)
|
||||
collision_mask = 1
|
||||
|
||||
[node name="灯笼" parent="Ground/AmbientLayer" index="0" instance=ExtResource("10_uxbu3")]
|
||||
position = Vector2(845, -25)
|
||||
@ -99,4 +82,3 @@ scale = Vector2(1.08, 1.08)
|
||||
color = Color(0.368627, 0.447059, 0.882353, 1)
|
||||
|
||||
[editable path="Ground"]
|
||||
[editable path="Ground/DeployLayer/Portal"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
extends Sprite2D
|
||||
extends Control
|
||||
|
||||
# answer for the puzzle, by columns
|
||||
@export var current_answer := [0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
@ -8,7 +8,7 @@ extends Sprite2D
|
||||
# @export var answer := [1, 4, 3, 1, 3, 6, 4, 3, 2]
|
||||
|
||||
@onready var points_polygon = $ButtonPositionPoints as Polygon2D
|
||||
@onready var box = $Box as Sprite2D
|
||||
@onready var box = $Box as TextureRect
|
||||
@onready var side_handle = $SideHandle as AnimatedSprite2D
|
||||
@onready var inside_handle = $Handle as TextureButton
|
||||
@onready var audio_player = $MusicPlayer2D as AudioStreamPlayer2D
|
||||
@ -45,9 +45,14 @@ var current_selected_btn := 0:
|
||||
func _ready() -> void:
|
||||
_chechout_mode()
|
||||
inside_handle.pressed.connect(_on_handle_pressed)
|
||||
# SceneManager.focus_node(self)
|
||||
# CameraFocusMarker.lock_horizontal = false
|
||||
# CameraFocusMarker.limit_top = 0
|
||||
# CameraFocusMarker.limit_bottom = 316
|
||||
|
||||
|
||||
func _chechout_mode(play_sfx := false) -> void:
|
||||
dragging = false
|
||||
$Handle.visible = mode == "opened"
|
||||
$SideHandle.visible = mode == "playing" or mode == "finished"
|
||||
_reset_buttons()
|
||||
@ -106,9 +111,9 @@ func _get_position(col: int, row: int) -> Vector2:
|
||||
# return Vector2(origin_position.x + col_gap * col, origin_position.y - row_gap * row)
|
||||
var index = col + row * 9
|
||||
if points_polygon.polygon and index < points_polygon.polygon.size():
|
||||
return points_polygon.polygon[index]
|
||||
return points_polygon.position + points_polygon.polygon[index]
|
||||
else:
|
||||
return Vector2(0, 0)
|
||||
return points_polygon.position
|
||||
|
||||
|
||||
# 1 up 2 down
|
||||
@ -143,6 +148,17 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
current_selected_btn = clampi(current_selected_btn - 1, 0, 8)
|
||||
elif event.is_action_pressed("right"):
|
||||
current_selected_btn = clampi(current_selected_btn + 1, 0, 8)
|
||||
if mode == "playing":
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT:
|
||||
if event.pressed:
|
||||
dragging = true
|
||||
else:
|
||||
dragging = false
|
||||
if event is InputEventMouseMotion:
|
||||
if dragging:
|
||||
#TODO
|
||||
inside_handle.position += event.relative
|
||||
|
||||
|
||||
func _on_handle_pressed() -> void:
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bmqpgfaibylvr" path="res://asset/art/little_game/八音盒/背景.png" id="1_j0wst"]
|
||||
[ext_resource type="Script" path="res://scene/little_game/八音盒.gd" id="2_opptd"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5mpi10kecd58" path="res://asset/art/little_game/八音盒/打开盒子.png" id="3_6n3rs"]
|
||||
[ext_resource type="Texture2D" uid="uid://xpa12fu26xhm" path="res://asset/art/little_game/八音盒/插销动画/插销-1.png" id="3_etora"]
|
||||
[ext_resource type="Texture2D" uid="uid://nihbhjx0fogm" path="res://asset/art/little_game/八音盒/插销.png" id="4_a11wt"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvae1ol414hau" path="res://asset/art/little_game/八音盒/插销动画/插销-2.png" id="4_ubbcw"]
|
||||
@ -12,7 +13,6 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dl7goysg51v6b" path="res://asset/art/little_game/八音盒/插销动画/插销-7.png" id="9_hwyly"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwwgy4pggu1tk" path="res://asset/art/little_game/八音盒/插销动画/插销-8.png" id="10_j5b7e"]
|
||||
[ext_resource type="Texture2D" uid="uid://cyud47ley8nvw" path="res://asset/art/little_game/八音盒/插销动画/插销-9.png" id="11_rg33s"]
|
||||
[ext_resource type="Texture2D" uid="uid://cew43x4qejyg" path="res://asset/art/little_game/八音盒/无按钮.png" id="13_e4m8h"]
|
||||
[ext_resource type="Script" path="res://ui/button/sound_texture_button.gd" id="14_xcojr"]
|
||||
[ext_resource type="AudioStream" uid="uid://casyb01uck7nn" path="res://asset/audio/sfx/ui/click.wav" id="15_b6p7a"]
|
||||
[ext_resource type="AudioStream" uid="uid://cttxrnnyung0f" path="res://asset/audio/sfx/game/八音盒/装上插销.mp3" id="16_g4agq"]
|
||||
@ -68,38 +68,77 @@ audios = Array[AudioStream]([ExtResource("15_b6p7a")])
|
||||
script = ExtResource("16_rlsyv")
|
||||
audios = Array[AudioStream]([ExtResource("16_g4agq")])
|
||||
|
||||
[node name="八音盒" type="Sprite2D"]
|
||||
texture = ExtResource("1_j0wst")
|
||||
[node name="八音盒" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
script = ExtResource("2_opptd")
|
||||
|
||||
[node name="MusicPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
position = Vector2(80, 13)
|
||||
stream = ExtResource("19_7mlnq")
|
||||
|
||||
[node name="Box" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("13_e4m8h")
|
||||
|
||||
[node name="ButtonPositionPoints" type="Polygon2D" parent="."]
|
||||
visible = false
|
||||
polygon = PackedVector2Array(-75, 7, -55, 7, -34, 7, -14, 7, 7, 7, 28, 7, 50, 7, 71, 7, 92, 7, -72, -1, -53, -1, -33, -1, -14, -1, 7, -1, 27, -1, 48, -1, 70, -1, 90, -1, -71, -7, -52, -6, -33, -6, -13, -6, 7, -6, 27, -6, 47, -6, 69, -6, 89, -6, -70, -11, -51, -11, -32, -11, -13, -11, 7, -11, 27, -11, 47, -11, 68, -11, 88, -11, -69, -16, -50, -16, -31, -16, -13, -16, 7, -16, 27, -16, 46, -16, 68, -16, 87, -16, -68, -20, -49, -20, -31, -20, -13, -20, 7, -20, 27, -20, 46, -20, 67, -20, 86, -20, -66, -25, -48, -25, -31, -25, -13, -25, 7, -25, 26, -25, 46, -25, 66, -25, 85, -25)
|
||||
|
||||
[node name="PivotTop" type="Marker2D" parent="."]
|
||||
position = Vector2(173, 2)
|
||||
|
||||
[node name="PivotBottom" type="Marker2D" parent="."]
|
||||
position = Vector2(190, 58)
|
||||
|
||||
[node name="SideHandle" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_t7gu7")
|
||||
|
||||
[node name="Handle" type="TextureButton" parent="."]
|
||||
[node name="BG" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -564.0
|
||||
offset_top = -240.0
|
||||
offset_left = -282.0
|
||||
offset_top = -120.0
|
||||
offset_right = 282.0
|
||||
offset_bottom = 120.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("1_j0wst")
|
||||
|
||||
[node name="MusicPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||
position = Vector2(407, 159)
|
||||
stream = ExtResource("19_7mlnq")
|
||||
|
||||
[node name="SideHandle" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, 38)
|
||||
sprite_frames = SubResource("SpriteFrames_t7gu7")
|
||||
frame = 8
|
||||
centered = false
|
||||
|
||||
[node name="Box" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -282.0
|
||||
offset_top = -120.0
|
||||
offset_right = 282.0
|
||||
offset_bottom = 120.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("3_6n3rs")
|
||||
|
||||
[node name="ButtonPositionPoints" type="Polygon2D" parent="."]
|
||||
position = Vector2(282, 158)
|
||||
polygon = PackedVector2Array(-75, 7, -55, 7, -34, 7, -14, 7, 7, 7, 28, 7, 50, 7, 71, 7, 92, 7, -72, -1, -53, -1, -33, -1, -14, -1, 7, -1, 27, -1, 48, -1, 70, -1, 90, -1, -71, -7, -52, -6, -33, -6, -13, -6, 7, -6, 27, -6, 47, -6, 69, -6, 89, -6, -70, -11, -51, -11, -32, -11, -13, -11, 7, -11, 27, -11, 47, -11, 68, -11, 88, -11, -69, -16, -50, -16, -31, -16, -13, -16, 7, -16, 27, -16, 46, -16, 68, -16, 87, -16, -68, -20, -49, -20, -31, -20, -13, -20, 7, -20, 27, -20, 46, -20, 67, -20, 86, -20, -66, -25, -48, -25, -31, -25, -13, -25, 7, -25, 26, -25, 46, -25, 66, -25, 85, -25)
|
||||
|
||||
[node name="PivotTop" type="Marker2D" parent="."]
|
||||
position = Vector2(469, 152)
|
||||
|
||||
[node name="PivotBottom" type="Marker2D" parent="."]
|
||||
position = Vector2(475, 218)
|
||||
|
||||
[node name="Handle" type="TextureButton" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -282.0
|
||||
offset_top = -120.0
|
||||
offset_right = 282.0
|
||||
offset_bottom = 120.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture_normal = ExtResource("4_a11wt")
|
||||
|
@ -9,6 +9,8 @@ func _ready() -> void:
|
||||
if GlobalConfig.DEBUG:
|
||||
get_window().always_on_top = true
|
||||
$UILayer.layer = GlobalConfig.CANVAS_LAYER_UI
|
||||
%ColorRectTop.visible = true
|
||||
%ColorRectBottom.visible = true
|
||||
_load_scene_config()
|
||||
|
||||
func _load_scene_config() -> void:
|
||||
|
@ -18,12 +18,25 @@ environment = ExtResource("9_jsof5")
|
||||
|
||||
[node name="GroundLoader" parent="." instance=ExtResource("10_8rc5n")]
|
||||
position = Vector2(1, 0)
|
||||
current_scene = "c02_s03"
|
||||
ignore_archive = true
|
||||
current_scene = "c01_s05"
|
||||
|
||||
[node name="MainPlayer" parent="." instance=ExtResource("6_6geb0")]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(80, 42)
|
||||
scale = Vector2(0.6, 0.6)
|
||||
player_movement_rect = null
|
||||
velocity_ratio = null
|
||||
action_locked = null
|
||||
current_status = null
|
||||
facing_direction = null
|
||||
is_laying = null
|
||||
is_climbing = null
|
||||
running_locked = null
|
||||
speed_walking = null
|
||||
speed_runnig = null
|
||||
speed_laying = null
|
||||
speed_climbing = null
|
||||
|
||||
[node name="ShadingLayer" parent="." instance=ExtResource("2_d1re1")]
|
||||
|
||||
@ -31,6 +44,8 @@ scale = Vector2(0.6, 0.6)
|
||||
layer = 11
|
||||
|
||||
[node name="ColorRectTop" type="ColorRect" parent="UILayer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(564, 38.5)
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
@ -40,9 +55,11 @@ offset_right = 282.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0.0519829, 0.0179176, 0.00269875, 1)
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="ColorRectBottom" type="ColorRect" parent="UILayer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(564, 38.5)
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
@ -55,7 +72,7 @@ offset_right = 282.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
color = Color(0.0519829, 0.0179176, 0.00269875, 1)
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Dialog" parent="UILayer" instance=ExtResource("3_prpss")]
|
||||
offset_left = -230.0
|
||||
|
@ -35,12 +35,11 @@ enum MOVEMENT_STATUS {
|
||||
if is_climbing:
|
||||
is_laying = false
|
||||
@export var running_locked := false
|
||||
@export var speed_walking := 90.0
|
||||
@export var speed_runnig := 160.0
|
||||
@export var speed_laying := 60.0
|
||||
@export var speed_climbing := 60.0
|
||||
@export var speed_walking := 75.0 #55
|
||||
@export var speed_runnig := 120.0 #125
|
||||
@export var speed_laying := 50.0
|
||||
@export var speed_climbing := 50.0
|
||||
#const JUMP_VELOCITY = -400.0
|
||||
@export var footstep_base_speed := 60.0
|
||||
|
||||
@onready var footstep_timer = %FootstepTimer as Timer
|
||||
@onready var sprite = %AnimatedSprite2D as AnimatedSprite2D
|
||||
@ -127,14 +126,14 @@ func _play_animation() -> void:
|
||||
sprite.play(&"walking_r")
|
||||
else:
|
||||
sprite.play(&"walking_l")
|
||||
footstep_timer.wait_time = footstep_base_speed / speed_walking
|
||||
footstep_timer.wait_time = 0.5
|
||||
footstep_timer.start()
|
||||
MOVEMENT_STATUS.RUNNING:
|
||||
if facing_direction.x > 0.0:
|
||||
sprite.play(&"running_r")
|
||||
else:
|
||||
sprite.play(&"running_l")
|
||||
footstep_timer.wait_time = footstep_base_speed / speed_runnig
|
||||
footstep_timer.wait_time = 7.0 / 10.0 / 2.0
|
||||
footstep_timer.start()
|
||||
MOVEMENT_STATUS.LAYING_STAY:
|
||||
if facing_direction.x > 0.0:
|
||||
@ -147,7 +146,7 @@ func _play_animation() -> void:
|
||||
sprite.play(&"laying_moving_r")
|
||||
else:
|
||||
sprite.play(&"laying_moving_l")
|
||||
footstep_timer.wait_time = footstep_base_speed / speed_laying
|
||||
footstep_timer.wait_time = 2.0 / 3.0
|
||||
footstep_timer.start()
|
||||
MOVEMENT_STATUS.CLIMBING_STAY:
|
||||
sprite.play(&"climbing_stay")
|
||||
@ -157,7 +156,7 @@ func _play_animation() -> void:
|
||||
sprite.play(&"climbing_down")
|
||||
else:
|
||||
sprite.play(&"climbing_up")
|
||||
footstep_timer.wait_time = footstep_base_speed / speed_climbing
|
||||
footstep_timer.wait_time = 2.0 / 3.0
|
||||
footstep_timer.start()
|
||||
|
||||
|
||||
@ -196,7 +195,7 @@ func _physics_process(_delta: float) -> void:
|
||||
global_position = global_position.clamp(player_movement_rect.position, player_movement_rect.end)
|
||||
# var delta_x = global_position.x - x
|
||||
# if delta_x:
|
||||
# SceneManager.player_moved_delta_x(delta_x)
|
||||
# SceneManager.player_moved_delta_x(delta_x)
|
||||
_tweak_camera_marker()
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ shape = SubResource("RectangleShape2D_fno82")
|
||||
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||
position = Vector2(1, -44)
|
||||
scale = Vector2(0.810547, 0.849609)
|
||||
energy = 0.7
|
||||
energy = 0.2
|
||||
texture = ExtResource("3_h4uja")
|
||||
texture_scale = 2.5
|
||||
texture_scale = 2.0
|
||||
height = 20.0
|
||||
|