书架小游戏:搭建基本玩法
This commit is contained in:
parent
157171fdec
commit
86cd6933e3
BIN
asset/art/little_game/书架/书架与书.aseprite
Normal file
BIN
asset/art/little_game/书架/书架与书.aseprite
Normal file
Binary file not shown.
BIN
asset/art/little_game/书架/书架与书.png
Normal file
BIN
asset/art/little_game/书架/书架与书.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
asset/art/ui/chess.png
Normal file
BIN
asset/art/ui/chess.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 817 B |
BIN
asset/art/ui/journal.aseprite
Normal file
BIN
asset/art/ui/journal.aseprite
Normal file
Binary file not shown.
BIN
asset/art/ui/journal.png
Normal file
BIN
asset/art/ui/journal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
File diff suppressed because one or more lines are too long
@ -15,6 +15,11 @@ class_name AssembledArchive extends Resource
|
||||
@export var prop_inventory: PropInventory
|
||||
|
||||
|
||||
@export_group("八音盒","bayinhe")
|
||||
@export var bayinhe_current_answer := [0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
@export_enum("closed", "opened", "playing", "finished") var bayinhe_mode := "closed"
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
if not prop_inventory:
|
||||
prop_inventory = PropInventory.new()
|
||||
|
@ -34,8 +34,8 @@ func _ready() -> void:
|
||||
func _notification(what):
|
||||
# handle window close request
|
||||
if what == NOTIFICATION_WM_CLOSE_REQUEST:
|
||||
if has_node("/root/Main"):
|
||||
save_all()
|
||||
if has_node("/root/Main"):
|
||||
print("Saved all success before Quit")
|
||||
SceneManager.pop_notification("已保存所有数据")
|
||||
var tree = get_tree()
|
||||
|
@ -7,8 +7,8 @@ const DEBUG = true
|
||||
const RES_FILE_FORMAT = ".tres"
|
||||
|
||||
## layers
|
||||
const CANVAS_LAYER_PROP_INSPECTOR = 12
|
||||
const CANVAS_LAYER_UI = 11
|
||||
const CANVAS_LAYER_UI = 12
|
||||
const CANVAS_LAYER_PROP_INSPECTOR = 11
|
||||
const CANVAS_LAYER_SHADING = 10
|
||||
const CANVAS_LAYER_FG = 2
|
||||
const CANVAS_LAYER_HD_ENTITY = 1
|
||||
|
@ -31,19 +31,18 @@ buses/default_bus_layout="res://config/default_bus_layout.tres"
|
||||
|
||||
[autoload]
|
||||
|
||||
DebugMenu="*res://addons/debug_menu/debug_menu.tscn"
|
||||
DebugMenu="res://addons/debug_menu/debug_menu.tscn"
|
||||
GlobalConfigManager="*res://manager/config_manager/global_config_manager.gd"
|
||||
ArchiveManager="*res://manager/archive_manager/archive_manager.gd"
|
||||
CameraFocusMarker="*res://scene/camera/camera_focus_marker.tscn"
|
||||
MainCamera="*res://scene/camera/main_camera.tscn"
|
||||
ShadingLayer="res://scene/shading/shading_layer.tscn"
|
||||
SceneManager="*res://manager/deploy/scene/scene_manager.gd"
|
||||
AudioManager="*res://manager/audio_manager/audio_manager.gd"
|
||||
EventManager="*res://manager/event_manager/event_manager.gd"
|
||||
DialogManager="*res://manager/deploy/dialog/dialog_manager.gd"
|
||||
CgManager="*res://manager/cg_manager/cg_manager.gd"
|
||||
InputManager="*res://manager/input/input_manager.gd"
|
||||
DialogueManager="*res://addons/dialogue_manager/dialogue_manager.gd"
|
||||
InputManager="res://manager/input/input_manager.gd"
|
||||
DialogueManager="res://addons/dialogue_manager/dialogue_manager.gd"
|
||||
|
||||
[dialogue_manager]
|
||||
|
||||
@ -131,6 +130,11 @@ prop_right={
|
||||
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(427, 48),"global_position":Vector2(446, 139),"factor":0.0300018,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
toggle_journal={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[internationalization]
|
||||
|
||||
@ -142,6 +146,8 @@ locale/translations_pot_files=PackedStringArray("res://asset/dialogue/item_descr
|
||||
2d_physics/layer_2="wall"
|
||||
2d_physics/layer_3="interactable"
|
||||
2d_physics/layer_4="hud_mouse"
|
||||
2d_physics/layer_5="journal"
|
||||
2d_physics/layer_6="journal_wall"
|
||||
|
||||
[rendering]
|
||||
|
||||
|
@ -15,7 +15,6 @@ script = ExtResource("1_fp2a8")
|
||||
|
||||
[node name="Sfx" parent="." instance=ExtResource("2_jmpkt")]
|
||||
unique_name_in_owner = true
|
||||
file = "物品查看.mp3"
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://ci5anaxsa1apl"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://ci5anaxsa1apl"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/entity/local_inspectable.gd" id="1_85el0"]
|
||||
[ext_resource type="PackedScene" uid="uid://c85t6stvytvjn" path="res://scene/entity/ux/sfx.tscn" id="2_h0c2s"]
|
||||
[ext_resource type="AudioStream" uid="uid://csdwhc83jshd3" path="res://asset/audio/sfx/ui/纸条.mp3" id="3_3ldx7"]
|
||||
[ext_resource type="Texture2D" uid="uid://t526pexw4ng4" path="res://asset/art/tool/neutral_point_light.webp" id="3_o562w"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvg6wjwn1qxiv" path="res://asset/art/ui/action_mark/探索ui.png" id="4_bi35o"]
|
||||
[ext_resource type="Script" path="res://scene/entity/ux/sign.gd" id="5_vsfuq"]
|
||||
@ -21,6 +22,7 @@ script = ExtResource("1_85el0")
|
||||
|
||||
[node name="Sfx" parent="." instance=ExtResource("2_h0c2s")]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("3_3ldx7")
|
||||
file = "纸条.mp3"
|
||||
|
||||
[node name="PointLight2D" type="PointLight2D" parent="."]
|
||||
@ -63,12 +65,14 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Cover" type="TextureRect" parent="InspectLayer/AspectRatioContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ContentLabel" type="Label" parent="InspectLayer/AspectRatioContainer"]
|
||||
unique_name_in_owner = true
|
||||
@ -89,6 +93,7 @@ autowrap_mode = 3
|
||||
[node name="MarginContainer" type="MarginContainer" parent="InspectLayer/AspectRatioContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_bottom = 38
|
||||
|
||||
[node name="TipLabel" type="Label" parent="InspectLayer/AspectRatioContainer/MarginContainer"]
|
||||
|
@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://jr1yd46wm5je"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://jr1yd46wm5je"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/entity/note.gd" id="1_3igk8"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvg6wjwn1qxiv" path="res://asset/art/ui/action_mark/探索ui.png" id="1_eew1k"]
|
||||
[ext_resource type="Script" path="res://scene/entity/ux/sign.gd" id="2_36okt"]
|
||||
[ext_resource type="PackedScene" uid="uid://c85t6stvytvjn" path="res://scene/entity/ux/sfx.tscn" id="2_qocmg"]
|
||||
[ext_resource type="Texture2D" uid="uid://t526pexw4ng4" path="res://asset/art/tool/neutral_point_light.webp" id="3_xb81s"]
|
||||
[ext_resource type="AudioStream" uid="uid://csdwhc83jshd3" path="res://asset/audio/sfx/ui/纸条.mp3" id="3_y3pwa"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_k6och"]
|
||||
resource_local_to_scene = true
|
||||
@ -16,6 +17,7 @@ notes = Array[String]([])
|
||||
|
||||
[node name="Sfx" parent="." instance=ExtResource("2_qocmg")]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("3_y3pwa")
|
||||
file = "纸条.mp3"
|
||||
|
||||
[node name="Sign" type="Sprite2D" parent="."]
|
||||
|
@ -1,8 +1,9 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dsa6frlw6e6gg"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dsa6frlw6e6gg"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/entity/pickable.gd" id="1_jk1u0"]
|
||||
[ext_resource type="PackedScene" uid="uid://c85t6stvytvjn" path="res://scene/entity/ux/sfx.tscn" id="2_8s5wk"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvg6wjwn1qxiv" path="res://asset/art/ui/action_mark/探索ui.png" id="2_bggcm"]
|
||||
[ext_resource type="AudioStream" uid="uid://c7r2qp78ukje" path="res://asset/audio/sfx/ui/令牌道具获取.wav" id="3_dxdbj"]
|
||||
[ext_resource type="Script" path="res://scene/entity/ux/sign.gd" id="3_hpbqf"]
|
||||
[ext_resource type="Texture2D" uid="uid://t526pexw4ng4" path="res://asset/art/tool/neutral_point_light.webp" id="5_yhysn"]
|
||||
|
||||
@ -15,6 +16,7 @@ script = ExtResource("1_jk1u0")
|
||||
|
||||
[node name="Sfx" parent="." instance=ExtResource("2_8s5wk")]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("3_dxdbj")
|
||||
file = "令牌道具获取.wav"
|
||||
|
||||
[node name="Sign" type="Sprite2D" parent="."]
|
||||
|
@ -1,15 +1,15 @@
|
||||
@tool
|
||||
class_name Sfx extends Node
|
||||
class_name Sfx extends AudioStreamPlayer
|
||||
|
||||
@export var volume_db := 0.0
|
||||
# @export var volume_db := 0.0
|
||||
@export_enum("child", "game/八音盒", "game/旋转锁", "ghost", "lvping", "ui", "c01", "c02") var dir := "ui":
|
||||
set(value):
|
||||
dir = value
|
||||
_update_files()
|
||||
#@export var file: String = "":
|
||||
#set(val):
|
||||
#if val and current_files.has(val):
|
||||
#file = val
|
||||
#set(val):
|
||||
#if val and current_files.has(val):
|
||||
#file = val
|
||||
|
||||
var file: String
|
||||
var sfx_root_path = "res://asset/audio/sfx/"
|
||||
@ -19,6 +19,7 @@ var sfx: AudioStream
|
||||
|
||||
func _ready() -> void:
|
||||
_update_files()
|
||||
bus = &"game_sfx"
|
||||
|
||||
func _reload_sfx():
|
||||
if file and dir:
|
||||
@ -26,6 +27,7 @@ func _reload_sfx():
|
||||
sfx = load(sfx_root_path + dir + "/" + file) as AudioStream
|
||||
else:
|
||||
sfx = null
|
||||
stream = sfx
|
||||
|
||||
|
||||
func _update_files():
|
||||
@ -50,14 +52,15 @@ func _update_files():
|
||||
|
||||
|
||||
#func _property_can_revert(property: StringName) -> bool:
|
||||
#if property == &"file":
|
||||
#return true
|
||||
#return false
|
||||
#if property == &"file":
|
||||
#return true
|
||||
#return false
|
||||
#
|
||||
#func _property_get_revert(property: StringName) -> Variant:
|
||||
#if property == &"file":
|
||||
#return ""
|
||||
#return null
|
||||
#if property == &"file":
|
||||
#return ""
|
||||
#return null
|
||||
|
||||
|
||||
func _get_property_list():
|
||||
return [
|
||||
@ -84,7 +87,6 @@ func _set(property: StringName, value: Variant) -> bool:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func play() -> void:
|
||||
if sfx:
|
||||
AudioManager.play_sfx(sfx, volume_db)
|
||||
# func play() -> void:
|
||||
# if sfx:
|
||||
# AudioManager.play_sfx(sfx, volume_db)
|
||||
|
@ -1,7 +1,10 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c85t6stvytvjn"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c85t6stvytvjn"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/entity/ux/sfx.gd" id="1_ng32y"]
|
||||
[ext_resource type="AudioStream" uid="uid://casyb01uck7nn" path="res://asset/audio/sfx/ui/click.wav" id="1_xj6dy"]
|
||||
|
||||
[node name="Sfx" type="Node"]
|
||||
[node name="Sfx" type="AudioStreamPlayer"]
|
||||
stream = ExtResource("1_xj6dy")
|
||||
bus = &"game_sfx"
|
||||
script = ExtResource("1_ng32y")
|
||||
file = "click.wav"
|
||||
|
@ -73,6 +73,7 @@ centered = false
|
||||
offset_right = 2256.0
|
||||
offset_bottom = 1268.0
|
||||
scale = Vector2(0.25, 0.25)
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||
transparent_bg = true
|
||||
|
@ -125,12 +125,12 @@ func _set_camera_and_player_boundary():
|
||||
# set current_boarder by bg size
|
||||
if bg.texture and not Engine.is_editor_hint():
|
||||
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)
|
||||
var camera_upleft = Vector2(0, -camera_size.y / 2.0)
|
||||
var camera_rect = Rect2(camera_upleft, camera_size)
|
||||
# player rect should be set centered, with 30px x padding
|
||||
var up_left = Vector2(0, -size.y / 2.0)
|
||||
size.x -= 36.0
|
||||
up_left.x = bg.position.x + 18.0
|
||||
var player_rect = Rect2(up_left, size)
|
||||
|
@ -33,7 +33,7 @@ size = Vector2(35, 70)
|
||||
[node name="Ground" parent="." instance=ExtResource("1_wrr6r")]
|
||||
scene_config = SubResource("Resource_hd50m")
|
||||
|
||||
[node name="BGSprite2D" parent="Ground" index="0"]
|
||||
[node name="BGSprite2D" parent="Ground" index="1"]
|
||||
texture = ExtResource("2_cn1s8")
|
||||
|
||||
[node name="PortalLeft" parent="Ground/DeployLayer" index="0"]
|
||||
|
@ -1,5 +1,5 @@
|
||||
@tool
|
||||
class_name PropHud extends CanvasItem
|
||||
class_name PropHud extends Control
|
||||
|
||||
@export_group("DebugItem")
|
||||
@export var add_item := false:
|
||||
@ -31,7 +31,6 @@ class_name PropHud extends CanvasItem
|
||||
@onready var prop_container = %PropContainer as Container
|
||||
@onready var mark = %Mark as TextureRect
|
||||
@onready var title_label = %TitleLabel as Label
|
||||
@onready var mouse_detector = %MouseDetector as StaticBody2D
|
||||
|
||||
var cached_inventory_textures := {}
|
||||
|
||||
@ -62,8 +61,8 @@ func _ready() -> void:
|
||||
# _toggle_btn_ability(false)
|
||||
left_btn.modulate.a = 0.5
|
||||
right_btn.modulate.a = 0.5
|
||||
mouse_detector.mouse_entered.connect(_on_mouse_entered)
|
||||
mouse_detector.mouse_exited.connect(_on_mouse_exited)
|
||||
mouse_entered.connect(_on_mouse_entered)
|
||||
mouse_exited.connect(_on_mouse_exited)
|
||||
selected = selected
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dc778gsjfr3ky"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dc778gsjfr3ky"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/hud/prop_hud.gd" id="1_bbv0a"]
|
||||
[ext_resource type="Texture2D" uid="uid://chyumeohdhwnh" path="res://asset/art/ui/hud/normal_left.png" id="2_bjc2b"]
|
||||
@ -10,22 +10,23 @@
|
||||
[ext_resource type="Texture2D" uid="uid://boqpr7i2a5uan" path="res://asset/art/ui/hud/normal_right.png" id="10_vkaik"]
|
||||
[ext_resource type="Texture2D" uid="uid://daj2n408y2vfp" path="res://asset/art/ui/hud/pressed_right.png" id="11_a512b"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oki4y"]
|
||||
size = Vector2(646.667, 416.667)
|
||||
|
||||
[node name="PropHUD" type="Control"]
|
||||
custom_minimum_size = Vector2(600, 500)
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 8.0
|
||||
offset_top = 4.0
|
||||
offset_right = 8.0
|
||||
offset_bottom = 4.0
|
||||
offset_right = 608.0
|
||||
offset_bottom = 504.0
|
||||
scale = Vector2(0.3, 0.3)
|
||||
mouse_filter = 1
|
||||
script = ExtResource("1_bbv0a")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
mouse_filter = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
@ -126,13 +127,3 @@ layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_font_sizes/font_size = 42
|
||||
text = "1012钥匙"
|
||||
|
||||
[node name="MouseDetector" type="StaticBody2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 8
|
||||
collision_mask = 8
|
||||
input_pickable = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="MouseDetector"]
|
||||
position = Vector2(256.667, 171.667)
|
||||
shape = SubResource("RectangleShape2D_oki4y")
|
||||
|
136
scene/journal/journal.gd
Normal file
136
scene/journal/journal.gd
Normal file
@ -0,0 +1,136 @@
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
@export var locked := false:
|
||||
set(val):
|
||||
locked = val
|
||||
if is_node_ready() and locked:
|
||||
display = false
|
||||
@export var display := false:
|
||||
set(val):
|
||||
if is_node_ready() and display != val:
|
||||
_toggle_display()
|
||||
display = val
|
||||
@export var boundart_rect := Rect2(0, 0, 1000, 1000):
|
||||
set(val):
|
||||
boundart_rect = val
|
||||
queue_redraw()
|
||||
@export_group("Tip", "tip_")
|
||||
@export var tip_content := "":
|
||||
set(val):
|
||||
tip_content = val
|
||||
if is_node_ready():
|
||||
reload()
|
||||
@export var tip_font_size := 12
|
||||
@export var tip_font_color := Color(1, 1, 1)
|
||||
@export var tip_item_position := Vector2(220, 220)
|
||||
|
||||
@onready var tip_container = $Tips as GridContainer
|
||||
@onready var items_root = $ItemsRoot as Node2D
|
||||
|
||||
var sty_box_empty := StyleBoxEmpty.new()
|
||||
|
||||
var item_scene := preload("res://scene/journal/journal_item.tscn")
|
||||
var tip_script := preload("res://scene/journal/journal_tip.gd")
|
||||
var item_script := preload("res://scene/journal/journal_item.gd")
|
||||
var items_dict := {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
reload()
|
||||
_toggle_display(false)
|
||||
|
||||
|
||||
func reload():
|
||||
for c in tip_container.get_children():
|
||||
c.queue_free()
|
||||
for v in items_dict.values():
|
||||
v.queue_free()
|
||||
items_dict.clear()
|
||||
var btn_name_prefix = "tip_btn_"
|
||||
for i in range(tip_content.length()):
|
||||
var tip = tip_content[i] as String
|
||||
var btn_margin = MarginContainer.new()
|
||||
btn_margin.set("theme_override_constants/margin_left", -5)
|
||||
btn_margin.set("theme_override_constants/margin_right", -5)
|
||||
btn_margin.set("theme_override_constants/margin_top", -4)
|
||||
btn_margin.set("theme_override_constants/margin_bottom", -4)
|
||||
var tip_btn = Button.new()
|
||||
tip_btn.flat = true
|
||||
tip_btn.text = tip
|
||||
tip_btn.toggle_mode = true
|
||||
tip_btn.set("theme_override_styles/focus", sty_box_empty)
|
||||
tip_btn.set("theme_override_font_sizes/font_size", tip_font_size)
|
||||
tip_btn.custom_minimum_size = Vector2(tip_font_size, tip_font_size)
|
||||
tip_btn.add_theme_color_override("font_color", tip_font_color)
|
||||
tip_btn.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
|
||||
tip_btn.size_flags_vertical = Control.SIZE_SHRINK_CENTER
|
||||
tip_btn.set_script(tip_script)
|
||||
tip_btn.toggled.connect(_on_toggle_btn.bind(tip, tip_btn))
|
||||
tip_btn.name = btn_name_prefix + str(i)
|
||||
btn_margin.add_child(tip_btn)
|
||||
tip_container.add_child(btn_margin)
|
||||
# items_dict[tip] = tip_btn
|
||||
|
||||
|
||||
func _on_toggle_btn(toggled_on: bool, content: String, btn) -> void:
|
||||
if not toggled_on and items_dict.has(btn.name):
|
||||
items_dict[btn.name].queue_free()
|
||||
items_dict.erase(content)
|
||||
elif toggled_on:
|
||||
var item = item_scene.instantiate()
|
||||
item.label_text = content
|
||||
item.boundart_rect = boundart_rect
|
||||
item.position = tip_item_position + Vector2(randf_range(-10, 10), randf_range(-10, 10))
|
||||
items_root.add_child(item)
|
||||
items_dict[btn.name] = item
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
# draw boundart_rect frame
|
||||
draw_rect(boundart_rect, Color(1, 0, 0), false, 2)
|
||||
|
||||
|
||||
var display_tween: Tween
|
||||
|
||||
|
||||
func _toggle_display(use_tween := true):
|
||||
if display_tween and display_tween.is_running():
|
||||
display_tween.kill()
|
||||
if display:
|
||||
if use_tween:
|
||||
display_tween = create_tween()
|
||||
# from bottom to top
|
||||
display_tween.tween_property(self, "position:y", 0.0, 0.5).set_trans(Tween.TRANS_CUBIC)
|
||||
# unlock items after display
|
||||
display_tween.tween_callback(_toggle_items_lock.bind(false))
|
||||
else:
|
||||
position.y = 0
|
||||
_toggle_items_lock(false)
|
||||
else:
|
||||
# lock items before hide
|
||||
_toggle_items_lock(true)
|
||||
if use_tween:
|
||||
display_tween = create_tween()
|
||||
# from top to bottom
|
||||
display_tween.tween_property(self, "position:y", 320.0, 0.5).set_trans(
|
||||
Tween.TRANS_CUBIC
|
||||
)
|
||||
else:
|
||||
position.y = 320.0
|
||||
|
||||
|
||||
func _toggle_items_lock(lock: bool) -> void:
|
||||
for v in items_dict.values():
|
||||
v.locked = lock
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("toggle_journal"):
|
||||
if locked:
|
||||
# TODO 使用 icon,去重
|
||||
SceneManager.pop_notification("🔒")
|
||||
return
|
||||
display = !display
|
||||
get_viewport().set_input_as_handled()
|
51
scene/journal/journal.tscn
Normal file
51
scene/journal/journal.tscn
Normal file
@ -0,0 +1,51 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cvbt5qm70cg7t"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b1b005cqrjuek" path="res://asset/art/ui/journal.png" id="1_l07pp"]
|
||||
[ext_resource type="Script" path="res://scene/journal/journal.gd" id="1_y2537"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvpb70uqj12r2" path="res://asset/art/little_game/八音盒/有按钮.png" id="2_3e7j3"]
|
||||
|
||||
[node name="Journal" type="CanvasLayer"]
|
||||
layer = 20
|
||||
|
||||
[node name="JournalRoot" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = 320.0
|
||||
offset_bottom = 320.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_y2537")
|
||||
locked = true
|
||||
|
||||
[node name="JournalPage" type="TextureRect" parent="JournalRoot"]
|
||||
show_behind_parent = true
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
rotation = 0.00704862
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_l07pp")
|
||||
|
||||
[node name="EntityPic" type="TextureRect" parent="JournalRoot"]
|
||||
layout_mode = 0
|
||||
offset_left = 138.0
|
||||
offset_top = 67.0
|
||||
offset_right = 702.0
|
||||
offset_bottom = 307.0
|
||||
rotation = 0.00262768
|
||||
scale = Vector2(0.249104, 0.24444)
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("2_3e7j3")
|
||||
|
||||
[node name="Tips" type="GridContainer" parent="JournalRoot"]
|
||||
layout_mode = 1
|
||||
offset_left = 262.0
|
||||
offset_top = 50.0
|
||||
offset_right = 382.0
|
||||
offset_bottom = 90.0
|
||||
columns = 12
|
||||
|
||||
[node name="ItemsRoot" type="Node2D" parent="JournalRoot"]
|
107
scene/journal/journal_item.gd
Normal file
107
scene/journal/journal_item.gd
Normal file
@ -0,0 +1,107 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var locked := false:
|
||||
set(val):
|
||||
locked = val
|
||||
if locked:
|
||||
listening = false
|
||||
dragging = false
|
||||
mouse_inside = false
|
||||
if is_node_ready():
|
||||
$CollisionShape2D.disabled = locked
|
||||
@export var label_text := "角":
|
||||
set(val):
|
||||
label_text = val
|
||||
if is_node_ready():
|
||||
$Label.text = label_text
|
||||
@export var boundart_rect := Rect2(0, 0, 1000, 1000)
|
||||
|
||||
static var occupied := false
|
||||
static var mutex := Mutex.new()
|
||||
var target_position := Vector2()
|
||||
|
||||
# draggable
|
||||
var listening := false
|
||||
var mouse_inside := false
|
||||
var dragging := false:
|
||||
set(val):
|
||||
if dragging == val:
|
||||
return
|
||||
var success = false
|
||||
if val:
|
||||
mutex.lock()
|
||||
dragging = !occupied
|
||||
if dragging:
|
||||
success = true
|
||||
occupied = true
|
||||
Input.set_default_cursor_shape(Input.CURSOR_DRAG)
|
||||
mutex.unlock()
|
||||
else:
|
||||
mutex.lock()
|
||||
if dragging:
|
||||
dragging = false
|
||||
occupied = false
|
||||
Input.set_default_cursor_shape(Input.CURSOR_ARROW)
|
||||
mutex.unlock()
|
||||
if success:
|
||||
_move_front()
|
||||
|
||||
|
||||
func _ready():
|
||||
$CollisionShape2D.disabled = locked
|
||||
$Label.text = label_text
|
||||
target_position = global_position
|
||||
mouse_entered.connect(_on_mouse_entered)
|
||||
mouse_exited.connect(_on_mouse_exited)
|
||||
|
||||
|
||||
func _move_front():
|
||||
var parent = get_parent()
|
||||
if not parent:
|
||||
return
|
||||
parent.move_child(self, parent.get_child_count() - 1)
|
||||
|
||||
|
||||
func _on_mouse_entered():
|
||||
listening = true
|
||||
mouse_inside = true
|
||||
|
||||
|
||||
func _on_mouse_exited():
|
||||
mouse_inside = false
|
||||
if not dragging:
|
||||
listening = false
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
if not locked and not dragging:
|
||||
move_and_slide()
|
||||
_clamp_position()
|
||||
target_position = position
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if locked or not listening:
|
||||
return
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT:
|
||||
if dragging and not mouse_inside:
|
||||
listening = false
|
||||
dragging = false
|
||||
else:
|
||||
dragging = event.pressed
|
||||
|
||||
if dragging and event is InputEventMouseMotion:
|
||||
var new_pos = event.position
|
||||
target_position = new_pos
|
||||
position = target_position
|
||||
_clamp_position()
|
||||
|
||||
|
||||
func _clamp_position():
|
||||
position.x = clamp(
|
||||
position.x, boundart_rect.position.x, boundart_rect.position.x + boundart_rect.size.x
|
||||
)
|
||||
position.y = clamp(
|
||||
position.y, boundart_rect.position.y, boundart_rect.position.y + boundart_rect.size.y
|
||||
)
|
44
scene/journal/journal_item.tscn
Normal file
44
scene/journal/journal_item.tscn
Normal file
@ -0,0 +1,44 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c02f7iylaxl75"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/journal/journal_item.gd" id="1_v5jv8"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1vafh15sxhrs" path="res://asset/art/ui/chess.png" id="2_aol7i"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l31y8"]
|
||||
atlas = ExtResource("2_aol7i")
|
||||
region = Rect2(7, 0, 28, 26)
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_w4qy1"]
|
||||
radius = 12.0
|
||||
|
||||
[node name="JournalItem" type="CharacterBody2D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 16
|
||||
input_pickable = true
|
||||
motion_mode = 1
|
||||
platform_wall_layers = 32
|
||||
script = ExtResource("1_v5jv8")
|
||||
locked = null
|
||||
label_text = null
|
||||
boundart_rect = null
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = SubResource("AtlasTexture_l31y8")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -6.0
|
||||
offset_top = -7.0
|
||||
offset_right = 34.0
|
||||
offset_bottom = 8.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_colors/font_color = Color(0.212185, 0.145932, 0.00506154, 1)
|
||||
text = "角"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_w4qy1")
|
6
scene/journal/journal_tip.gd
Normal file
6
scene/journal/journal_tip.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends Button
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
if button_pressed:
|
||||
draw_circle(Vector2(9, 9), 6, Color(0, 0.5, 0, 0.5))
|
149
scene/little_game/书架.gd
Normal file
149
scene/little_game/书架.gd
Normal file
@ -0,0 +1,149 @@
|
||||
extends Control
|
||||
|
||||
const NON_SELECTED = [-1, -1]
|
||||
# 3 layers, original order is the correct answer
|
||||
@export var current_answer := [[0, 1, 2, 3, 4], [0, 1, 2, 3], [0, 1, 2, 3]]
|
||||
|
||||
@onready var sfx_select = $SfxSelect as Sfx
|
||||
@onready var sfx_interchange = $SfxInterchange as Sfx
|
||||
|
||||
var book_width_by_row := []
|
||||
|
||||
var suffling := false
|
||||
# [row, col]
|
||||
var selected_book := NON_SELECTED:
|
||||
set(value):
|
||||
if selected_book == value:
|
||||
return
|
||||
if suffling:
|
||||
selected_book = value
|
||||
return
|
||||
if selected_book != NON_SELECTED:
|
||||
_toggle_book(false, selected_book[0], selected_book[1])
|
||||
if value != NON_SELECTED:
|
||||
_toggle_book(true, value[0], value[1])
|
||||
selected_book = value
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_measure_width_by_row()
|
||||
_connect_signals()
|
||||
# shuffle at the end
|
||||
_shuffle_books()
|
||||
|
||||
|
||||
func _measure_width_by_row() -> void:
|
||||
for row in range(3):
|
||||
var length = current_answer[row].size()
|
||||
var width_arr = []
|
||||
for col in range(length):
|
||||
var book_btn = _get_book_by_id(row, col).get_node("BookButton") as TextureButton
|
||||
# book_btn.position.y = -book_btn.texture_normal.get_height()
|
||||
# book_btn.size = book_btn.texture_normal.get_size()
|
||||
# add 1 to avoid the gap between books
|
||||
width_arr.append(book_btn.texture_normal.get_width() + 1)
|
||||
book_width_by_row.append(width_arr)
|
||||
|
||||
|
||||
func _shuffle_books() -> void:
|
||||
selected_book = NON_SELECTED
|
||||
suffling = true
|
||||
for row in range(3):
|
||||
# shuffle each row 20 times
|
||||
var r_size = current_answer[row].size()
|
||||
for _i in range(20):
|
||||
var col_1 = randi() % r_size
|
||||
var col_2 = randi() % r_size
|
||||
selected_book = [row, col_1]
|
||||
_interchange_book(row, col_2, false)
|
||||
_relocate_books(row)
|
||||
# turn off initilazing after shuffle
|
||||
suffling = false
|
||||
|
||||
|
||||
func _connect_signals() -> void:
|
||||
for row in range(3):
|
||||
var r_size = current_answer[row].size()
|
||||
for id in range(r_size):
|
||||
var book = _get_book_by_id(row, id)
|
||||
book.get_node("BookButton").pressed.connect(_on_book_pressed.bind(row, id))
|
||||
|
||||
|
||||
func _on_book_pressed(row: int, id: int) -> void:
|
||||
var col = current_answer[row].find(id)
|
||||
if selected_book == NON_SELECTED:
|
||||
selected_book = [row, col]
|
||||
else:
|
||||
if selected_book == [row, col]:
|
||||
selected_book = NON_SELECTED
|
||||
elif selected_book[0] == row:
|
||||
_interchange_book(row, col)
|
||||
else:
|
||||
selected_book = [row, col]
|
||||
|
||||
|
||||
func _get_book_by_id(row: int, id: int) -> Node2D:
|
||||
return get_node("./Shelf/Layer" + str(row) + "/Book" + str(id))
|
||||
|
||||
|
||||
# func _get_book_by_pos(row: int, col: int) -> Node2D:
|
||||
# var layer = get_node("./Shelf/Layer" + str(row))
|
||||
# return layer.get_child(col)
|
||||
|
||||
|
||||
func _toggle_book(selected: bool, row: int, col: int) -> void:
|
||||
var id = current_answer[row][col]
|
||||
var book = _get_book_by_id(row, id)
|
||||
var book_tween = create_tween()
|
||||
sfx_select.play()
|
||||
if selected:
|
||||
book_tween.parallel().tween_property(book, "position:y", -10.0, 0.2)
|
||||
else:
|
||||
book_tween.parallel().tween_property(book, "position:y", 0.0, 0.2)
|
||||
|
||||
|
||||
func _interchange_book(row: int, col: int, relocate := true) -> void:
|
||||
if selected_book == NON_SELECTED or selected_book[0] != row:
|
||||
return
|
||||
var col2 = selected_book[1]
|
||||
sfx_interchange.play()
|
||||
# interchange current_answer
|
||||
var temp = current_answer[row][col]
|
||||
current_answer[row][col] = current_answer[row][col2]
|
||||
current_answer[row][col2] = temp
|
||||
# reset selected_book
|
||||
selected_book = NON_SELECTED
|
||||
# relocate after reset selected_book
|
||||
if relocate:
|
||||
_relocate_books(row)
|
||||
# check answer
|
||||
_check_answer()
|
||||
|
||||
|
||||
func _relocate_books(row: int) -> void:
|
||||
selected_book = NON_SELECTED
|
||||
var r_size = current_answer[row].size()
|
||||
var x = 0
|
||||
for col in range(r_size):
|
||||
var id = current_answer[row][col]
|
||||
var book = _get_book_by_id(row, id)
|
||||
book.position.x = x
|
||||
book.position.y = 0.0
|
||||
x += book_width_by_row[row][id]
|
||||
|
||||
|
||||
func _check_answer() -> void:
|
||||
for row in range(3):
|
||||
var r_size = current_answer[row].size()
|
||||
for col in range(r_size):
|
||||
if current_answer[row][col] != col:
|
||||
return
|
||||
# success
|
||||
_success()
|
||||
|
||||
|
||||
func _success() -> void:
|
||||
print("Success!")
|
||||
$Success.visible = true
|
||||
#TODO
|
||||
pass
|
323
scene/little_game/书架.tscn
Normal file
323
scene/little_game/书架.tscn
Normal file
@ -0,0 +1,323 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://fwfr0b2sylwx"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/little_game/书架.gd" id="1_8af23"]
|
||||
[ext_resource type="Texture2D" uid="uid://csrb0kuf5qx80" path="res://asset/art/little_game/书架/书架与书.png" id="1_bap6w"]
|
||||
[ext_resource type="AudioStream" uid="uid://bxfm22t1rj2cq" path="res://asset/audio/sfx/ui/收起纸条.mp3" id="2_glfpo"]
|
||||
[ext_resource type="PackedScene" uid="uid://c85t6stvytvjn" path="res://scene/entity/ux/sfx.tscn" id="3_03tyv"]
|
||||
[ext_resource type="AudioStream" uid="uid://bpdot5dxm6vwi" path="res://asset/audio/sfx/ui/挂画查看.mp3" id="3_elhhm"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_goijy"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(1, 14, 417, 224)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_c3g4t"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(12, 254, 15, 61)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pmg84"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(34, 261, 13, 54)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5xs8h"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(58, 264, 13, 49)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4cxbt"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(80, 272, 10, 41)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_x1voy"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(95, 277, 9, 35)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4i6n2"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(12, 254, 15, 61)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3jfnd"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(34, 261, 13, 54)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b3xvs"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(12, 254, 15, 61)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pv5xt"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(80, 272, 10, 41)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0m1py"]
|
||||
atlas = ExtResource("1_bap6w")
|
||||
region = Rect2(112, 279, 9, 32)
|
||||
|
||||
[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 = 2
|
||||
script = ExtResource("1_8af23")
|
||||
|
||||
[node name="SfxInterchange" parent="." instance=ExtResource("3_03tyv")]
|
||||
stream = ExtResource("3_elhhm")
|
||||
file = "挂画查看.mp3"
|
||||
|
||||
[node name="SfxSelect" parent="." instance=ExtResource("3_03tyv")]
|
||||
stream = ExtResource("2_glfpo")
|
||||
file = "收起纸条.mp3"
|
||||
|
||||
[node name="BG" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 14
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_top = -120.0
|
||||
offset_bottom = 120.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0.0404907, 0.185259, 0.00063979, 1)
|
||||
|
||||
[node name="Shelf" type="Sprite2D" parent="."]
|
||||
position = Vector2(283, 160)
|
||||
texture = SubResource("AtlasTexture_goijy")
|
||||
|
||||
[node name="Layer0" type="Control" parent="Shelf"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = -125.0
|
||||
offset_top = -9.0
|
||||
offset_right = -125.0
|
||||
offset_bottom = -9.0
|
||||
|
||||
[node name="Book0" type="Node2D" parent="Shelf/Layer0"]
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer0/Book0"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_c3g4t")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Book1" type="Node2D" parent="Shelf/Layer0"]
|
||||
position = Vector2(50.5455, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer0/Book1"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_pmg84")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Book2" type="Node2D" parent="Shelf/Layer0"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer0/Book2"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_5xs8h")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Book3" type="Node2D" parent="Shelf/Layer0"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer0/Book3"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -41.0
|
||||
offset_right = 10.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_4cxbt")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Book4" type="Node2D" parent="Shelf/Layer0"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer0/Book4"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -35.0
|
||||
offset_right = 9.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_x1voy")
|
||||
|
||||
[node name="Layer1" type="Control" parent="Shelf"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = -167.0
|
||||
offset_top = 97.0
|
||||
offset_right = -167.0
|
||||
offset_bottom = 97.0
|
||||
|
||||
[node name="Book0" type="Node2D" parent="Shelf/Layer1"]
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer1/Book0"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_4i6n2")
|
||||
|
||||
[node name="Book1" type="Node2D" parent="Shelf/Layer1"]
|
||||
position = Vector2(50.5455, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer1/Book1"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_3jfnd")
|
||||
|
||||
[node name="Book2" type="Node2D" parent="Shelf/Layer1"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer1/Book2"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_5xs8h")
|
||||
|
||||
[node name="Book3" type="Node2D" parent="Shelf/Layer1"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer1/Book3"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -41.0
|
||||
offset_right = 10.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_4cxbt")
|
||||
|
||||
[node name="Layer2" type="Control" parent="Shelf"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 28.0
|
||||
offset_top = 97.0
|
||||
offset_right = 28.0
|
||||
offset_bottom = 97.0
|
||||
|
||||
[node name="Book0" type="Node2D" parent="Shelf/Layer2"]
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer2/Book0"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -61.0
|
||||
offset_right = 15.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_b3xvs")
|
||||
|
||||
[node name="Book1" type="Node2D" parent="Shelf/Layer2"]
|
||||
position = Vector2(50.5455, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer2/Book1"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -49.0
|
||||
offset_right = 13.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_5xs8h")
|
||||
|
||||
[node name="Book2" type="Node2D" parent="Shelf/Layer2"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer2/Book2"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -41.0
|
||||
offset_right = 10.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_pv5xt")
|
||||
|
||||
[node name="Book3" type="Node2D" parent="Shelf/Layer2"]
|
||||
position = Vector2(98.2728, 0.818183)
|
||||
|
||||
[node name="BookButton" type="TextureButton" parent="Shelf/Layer2/Book3"]
|
||||
clip_contents = true
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -32.0
|
||||
offset_right = 9.0
|
||||
grow_vertical = 0
|
||||
texture_normal = SubResource("AtlasTexture_0m1py")
|
||||
|
||||
[node name="ColorRectTop" type="ColorRect" parent="."]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(564, 38.5)
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -282.0
|
||||
offset_right = 282.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 2
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="ColorRectBottom" type="ColorRect" parent="."]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(564, 38.5)
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -282.0
|
||||
offset_top = -38.5
|
||||
offset_right = 282.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Success" type="Label" parent="."]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 230.0
|
||||
offset_top = 142.0
|
||||
offset_right = 310.0
|
||||
offset_bottom = 191.0
|
||||
theme_override_font_sizes/font_size = 40
|
||||
text = "成功"
|
@ -1,12 +1,15 @@
|
||||
extends Control
|
||||
|
||||
# answer for the puzzle, by columns
|
||||
@export var current_answer := [0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
# @export var answer := [1, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
@export var answer := [1, 4, 3, 1, 3, 6, 4, 3, 2]
|
||||
@export_enum("closed", "opened", "playing", "finished") var mode := "closed"
|
||||
@export var playing_step_degree := 45.0
|
||||
@export var playing_steps := 10
|
||||
@export var debug_reload := false:
|
||||
set(value):
|
||||
if value:
|
||||
debug_reload = false
|
||||
_chechout_mode()
|
||||
|
||||
@onready var points_polygon = $ButtonPositionPoints as Polygon2D
|
||||
@onready var box = $Box as TextureRect
|
||||
@ -46,20 +49,26 @@ var playing_step_sec := 0.5
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
# debug mode: reset
|
||||
if GlobalConfig.DEBUG:
|
||||
ArchiveManager.archive.bayinhe_mode = "closed"
|
||||
ArchiveManager.archive.bayinhe_current_answer = [0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
playing_step_sec = audio_manual.get_length() / playing_steps
|
||||
_chechout_mode()
|
||||
inside_handle.pressed.connect(_on_handle_pressed)
|
||||
handle_wheel.rotated.connect(_on_wheel_rotated)
|
||||
|
||||
# # test close shaking effect
|
||||
# mode = "playing"
|
||||
# ArchiveManager.archive.bayinhe_mode = "playing"
|
||||
# _chechout_mode(true)
|
||||
# get_tree().create_timer(1.0).timeout.connect(_on_auto_play_finished)
|
||||
|
||||
|
||||
func _chechout_mode(play_sfx := false) -> void:
|
||||
var mode = ArchiveManager.archive.bayinhe_mode
|
||||
inside_handle.visible = mode == "opened"
|
||||
side_handle.visible = mode == "playing" or mode == "finished"
|
||||
$LidHint.visible = mode == "closed"
|
||||
_reset_buttons()
|
||||
match mode:
|
||||
"closed":
|
||||
@ -84,7 +93,7 @@ func _chechout_mode(play_sfx := false) -> void:
|
||||
|
||||
|
||||
func _reset_buttons():
|
||||
if mode != "closed":
|
||||
if ArchiveManager.archive.bayinhe_mode != "closed":
|
||||
if has_node("button_root"):
|
||||
get_node("button_root").visible = false
|
||||
return
|
||||
@ -105,7 +114,7 @@ func _reset_buttons():
|
||||
else:
|
||||
button.texture = button_texture
|
||||
# load current_answer
|
||||
button.position = _get_position(i, current_answer[i])
|
||||
button.position = _get_position(i, ArchiveManager.archive.bayinhe_current_answer[i])
|
||||
|
||||
|
||||
# 自动计算的位置会有偏差,使用 polygon 的点进行标记
|
||||
@ -123,11 +132,11 @@ func _get_position(col: int, row: int) -> Vector2:
|
||||
|
||||
# 1 up 2 down
|
||||
func _move_button(delta: int) -> void:
|
||||
if mode != "closed":
|
||||
if ArchiveManager.archive.bayinhe_mode != "closed":
|
||||
return
|
||||
var current_row = current_answer[current_selected_btn]
|
||||
var target_row = clampi(current_answer[current_selected_btn] + delta, 0, 6)
|
||||
current_answer[current_selected_btn] = target_row
|
||||
var current_row = ArchiveManager.archive.bayinhe_current_answer[current_selected_btn]
|
||||
var target_row = clampi(current_row + delta, 0, 6)
|
||||
ArchiveManager.archive.bayinhe_current_answer[current_selected_btn] = target_row
|
||||
# tween if not in correct position
|
||||
if current_row != target_row:
|
||||
var target_position = _get_position(current_selected_btn, target_row)
|
||||
@ -137,13 +146,15 @@ func _move_button(delta: int) -> void:
|
||||
audio_player.stream = sfx_drag
|
||||
audio_player.play()
|
||||
# check if all buttons are in correct position
|
||||
if current_answer == answer:
|
||||
mode = "opened"
|
||||
if ArchiveManager.archive.bayinhe_current_answer == answer:
|
||||
ArchiveManager.archive.bayinhe_mode = "opened"
|
||||
_chechout_mode(true)
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if mode == "closed":
|
||||
if event.is_action_pressed("cancel"):
|
||||
pass
|
||||
if ArchiveManager.archive.bayinhe_mode == "closed":
|
||||
# move button
|
||||
if event.is_action_pressed("up"):
|
||||
_move_button(1)
|
||||
@ -153,8 +164,6 @@ 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":
|
||||
pass
|
||||
|
||||
|
||||
func _on_handle_pressed() -> void:
|
||||
@ -163,7 +172,7 @@ func _on_handle_pressed() -> void:
|
||||
|
||||
|
||||
func _checkout_playing():
|
||||
mode = "playing"
|
||||
ArchiveManager.archive.bayinhe_mode = "playing"
|
||||
box.z_index = 10
|
||||
var tween = create_tween()
|
||||
audio_player.stream = sfx_assemble
|
||||
@ -180,7 +189,7 @@ var continue_playing := false
|
||||
|
||||
|
||||
func _on_wheel_rotated(radiant: float) -> void:
|
||||
if mode != "playing" or accumulated_steps >= playing_steps:
|
||||
if ArchiveManager.archive.bayinhe_mode != "playing" or accumulated_steps >= playing_steps:
|
||||
return
|
||||
accumulated_radiant += radiant
|
||||
if abs(accumulated_radiant) > deg_to_rad(playing_step_degree):
|
||||
@ -225,14 +234,14 @@ func _checkout_auto_play():
|
||||
|
||||
func _on_auto_play_finished():
|
||||
side_handle.pause()
|
||||
mode = "finished"
|
||||
ArchiveManager.archive.bayinhe_mode = "finished"
|
||||
# 不播放关闭音效,因为自动播放时已经播放过了
|
||||
_chechout_mode(false)
|
||||
# 抖动效果,逐渐减弱
|
||||
var tween = create_tween()
|
||||
var fps := 6.0
|
||||
var duration := 0.5
|
||||
var delta := 4.0
|
||||
var fps := 10.0
|
||||
var duration := 0.4
|
||||
var delta := 6.0
|
||||
var origin_pos = box.position
|
||||
var count = int(duration * fps)
|
||||
var delta_t = 1.0 / fps
|
||||
|
@ -17,7 +17,7 @@ func _ready() -> void:
|
||||
key_origin_x = key.position.x
|
||||
# randomize the initial rotation of the gears
|
||||
for i in range(5):
|
||||
random_degrees[i] = snappedi(randf_range(0, 360), 20)
|
||||
random_degrees[i] = snappedi(randf_range(0, 360), 10)
|
||||
var gear = get_node("Pivot/" + str(i)) as Area2D
|
||||
gear.area_entered.connect(_on_gear_touched)
|
||||
$"Pivot/5".area_entered.connect(_on_success)
|
||||
@ -25,7 +25,7 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _on_gear_touched(_area):
|
||||
print("Gear touched!")
|
||||
# print("Gear touched!")
|
||||
if not freeze:
|
||||
_reset_all()
|
||||
|
||||
@ -33,6 +33,7 @@ func _on_gear_touched(_area):
|
||||
func _on_success(_area):
|
||||
freeze = true
|
||||
print("Success!")
|
||||
$SfxOpen.play()
|
||||
#TODO
|
||||
|
||||
|
||||
@ -66,5 +67,6 @@ func move_key(direction := 1):
|
||||
if tween_key and tween_key.is_running():
|
||||
return
|
||||
actived_gear = clampi(actived_gear + direction, 0, 5)
|
||||
$SfxKey.play()
|
||||
tween_key = create_tween()
|
||||
tween_key.tween_property(key, "position:x", key_origin_x + gear_x_delta[actived_gear], 0.5)
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://ddpaot630cntr"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://ddpaot630cntr"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/little_game/旋转锁.gd" id="1_lag7y"]
|
||||
[ext_resource type="Texture2D" uid="uid://cv3ijagml76v0" path="res://asset/art/little_game/旋转锁/旋转锁背景.png" id="1_srn7i"]
|
||||
@ -12,6 +12,8 @@
|
||||
[ext_resource type="Texture2D" uid="uid://b2s0v602s7rfp" path="res://asset/art/little_game/旋转锁/钥匙.png" id="9_2tu7h"]
|
||||
[ext_resource type="AudioStream" uid="uid://o6fwujx5pug3" path="res://asset/audio/sfx/game/旋转锁/转轮声.mp3" id="10_4iyuf"]
|
||||
[ext_resource type="AudioStream" uid="uid://dmho8fjw45rbm" path="res://asset/audio/sfx/game/旋转锁/插销声.mp3" id="11_h2ycu"]
|
||||
[ext_resource type="PackedScene" uid="uid://c85t6stvytvjn" path="res://scene/entity/ux/sfx.tscn" id="13_121lr"]
|
||||
[ext_resource type="AudioStream" uid="uid://xw7fy2olhxdt" path="res://asset/audio/sfx/ui/门锁互动.mp3" id="14_owvcm"]
|
||||
|
||||
[node name="旋转锁" type="Control"]
|
||||
layout_mode = 3
|
||||
@ -129,12 +131,16 @@ polygon = PackedVector2Array(49.5, -4.5, 9, -4, -18, -1, -52, -1, -52, 1, -18, 1
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Key"]
|
||||
texture = ExtResource("9_2tu7h")
|
||||
|
||||
[node name="SfxGear" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
[node name="SfxGear" parent="." instance=ExtResource("13_121lr")]
|
||||
stream = ExtResource("10_4iyuf")
|
||||
bus = &"game_sfx"
|
||||
dir = "game/旋转锁"
|
||||
file = "转轮声.mp3"
|
||||
|
||||
[node name="SfxKey" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
[node name="SfxKey" parent="." instance=ExtResource("13_121lr")]
|
||||
stream = ExtResource("11_h2ycu")
|
||||
bus = &"game_sfx"
|
||||
dir = "game/旋转锁"
|
||||
file = "插销声.mp3"
|
||||
|
||||
[node name="SfxOpen" parent="." instance=ExtResource("13_121lr")]
|
||||
stream = ExtResource("14_owvcm")
|
||||
file = "门锁互动.mp3"
|
||||
|
@ -1,7 +1,7 @@
|
||||
extends Area2D
|
||||
|
||||
@export var active := false
|
||||
@export var rotation_step_degrees := 20.0
|
||||
@export var rotation_step_degrees := 10.0
|
||||
@export var target_rotation_degrees := 0.0
|
||||
|
||||
@onready var sfx_gear = $"../../SfxGear" as AudioStreamPlayer
|
||||
@ -31,8 +31,8 @@ func _physics_process(delta: float) -> void:
|
||||
var diff = target_rotation_degrees - rotation_degrees
|
||||
if abs(diff) > 0.1:
|
||||
var direction = sign(diff)
|
||||
var target_angular_velocity = direction * 60.0
|
||||
current_angular_velocity = lerp(current_angular_velocity, target_angular_velocity, 0.2)
|
||||
var target_angular_velocity = direction * 50.0
|
||||
current_angular_velocity = lerp(current_angular_velocity, target_angular_velocity, 0.1)
|
||||
rotation_degrees += current_angular_velocity * delta
|
||||
if active and not sfx_gear.playing:
|
||||
sfx_gear.play()
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dygvcmykn02n8"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dygvcmykn02n8"]
|
||||
|
||||
[ext_resource type="Script" path="res://scene/main.gd" id="1_pks84"]
|
||||
[ext_resource type="PackedScene" uid="uid://3gk1gxwanw24" path="res://scene/shading/shading_layer.tscn" id="2_d1re1"]
|
||||
@ -9,6 +9,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cjhw5ecygrqty" path="res://scene/player/main_player.tscn" id="6_6geb0"]
|
||||
[ext_resource type="Environment" uid="uid://c6ri8tn5qt6fe" path="res://scene/ground/environment.tres" id="9_jsof5"]
|
||||
[ext_resource type="PackedScene" uid="uid://clxgkj80yin2" path="res://scene/ground/ground_loader.tscn" id="10_8rc5n"]
|
||||
[ext_resource type="PackedScene" uid="uid://cvbt5qm70cg7t" path="res://scene/journal/journal.tscn" id="10_durpa"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_pks84")
|
||||
@ -40,8 +41,12 @@ speed_climbing = null
|
||||
|
||||
[node name="ShadingLayer" parent="." instance=ExtResource("2_d1re1")]
|
||||
|
||||
[node name="PropInspector" parent="." instance=ExtResource("5_ux0rw")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="UILayer" type="CanvasLayer" parent="."]
|
||||
layer = 11
|
||||
layer = 12
|
||||
|
||||
[node name="ColorRectTop" type="ColorRect" parent="UILayer"]
|
||||
unique_name_in_owner = true
|
||||
@ -81,12 +86,14 @@ offset_right = 230.0
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Notification" parent="UILayer" instance=ExtResource("5_3gg5t")]
|
||||
offset_left = -12.0
|
||||
offset_top = -2.0
|
||||
offset_right = -12.0
|
||||
offset_bottom = -2.0
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="PropHUD" parent="UILayer" instance=ExtResource("4_t7gb2")]
|
||||
scale = Vector2(0.24, 0.24)
|
||||
mouse_filter = 2
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="PropInspector" parent="." instance=ExtResource("5_ux0rw")]
|
||||
unique_name_in_owner = true
|
||||
[node name="Journal" parent="." instance=ExtResource("10_durpa")]
|
||||
|
@ -21,6 +21,7 @@ var blinking_tween : Tween
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
visible = false
|
||||
layer = GlobalConfig.CANVAS_LAYER_PROP_INSPECTOR
|
||||
texture_rect.modulate.a = 0.0
|
||||
content_label.modulate.a = 0.0
|
||||
@ -48,6 +49,7 @@ func _post_hide():
|
||||
texture_notes = null
|
||||
content_label.text = ""
|
||||
tip_label.text = tip_cover
|
||||
visible = false
|
||||
|
||||
|
||||
func _blink_label(init := true):
|
||||
@ -64,6 +66,7 @@ func _blink_label(init := true):
|
||||
|
||||
func pop_inspection(cover_texture, notes_texture, inspection_note):
|
||||
status = STATUS_INSPECTING_COVER
|
||||
visible = true
|
||||
texture_rect.texture = cover_texture
|
||||
texture_cover = cover_texture
|
||||
texture_notes = notes_texture
|
||||
@ -74,13 +77,15 @@ func pop_inspection(cover_texture, notes_texture, inspection_note):
|
||||
_blink_label()
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if status == STATUS_HIDDEN:
|
||||
return
|
||||
if event.is_action_pressed("cancel"):
|
||||
quit.emit()
|
||||
_hide()
|
||||
get_viewport().set_input_as_handled()
|
||||
if event.is_action_pressed("interact"):
|
||||
get_viewport().set_input_as_handled()
|
||||
if status == STATUS_INSPECTING_COVER:
|
||||
# inspect notes
|
||||
status = STATUS_INSPECTING_NOTES
|
||||
|
@ -8,7 +8,7 @@ line_spacing = 1.0
|
||||
font_size = 11
|
||||
|
||||
[node name="PropInspector" type="CanvasLayer"]
|
||||
layer = 12
|
||||
layer = 11
|
||||
script = ExtResource("1_2wpwe")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
@ -65,6 +65,7 @@ offset_top = -40.0
|
||||
offset_right = 47.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_bottom = 38
|
||||
|
||||
[node name="TipLabel" type="Label" parent="MarginContainer"]
|
||||
|
@ -63,6 +63,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="BackBufferCopy" type="BackBufferCopy" parent="ChromaticAbberation"]
|
||||
copy_mode = 2
|
||||
@ -75,7 +76,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="BackBufferCopy" type="BackBufferCopy" parent="Palette"]
|
||||
copy_mode = 2
|
||||
@ -88,7 +89,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="BackBufferCopy" type="BackBufferCopy" parent="GlitchEffect"]
|
||||
copy_mode = 2
|
||||
@ -107,7 +108,6 @@ offset_right = 300.0
|
||||
offset_bottom = 256.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = SubResource("NoiseTexture2D_oe2uy")
|
||||
stretch_mode = 1
|
||||
|
||||
@ -121,7 +121,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="BackBufferCopy" type="BackBufferCopy" parent="Vignette"]
|
||||
copy_mode = 2
|
||||
|
Loading…
Reference in New Issue
Block a user