added a debug menu and minor optimization regarding popup prompts
title says all
This commit is contained in:
parent
4bdd4d1708
commit
72703e785b
22 changed files with 37 additions and 271 deletions
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bw8dt5rd8j50y"
|
||||
path="res://.godot/imported/csoszogás-001.wav-0976c0dfc3dac2bd9964d947a46a804d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-001.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-001.wav-0976c0dfc3dac2bd9964d947a46a804d.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dkxliin18sua2"
|
||||
path="res://.godot/imported/csoszogás-002.wav-1201d68ef6ccf16eafdbf55c3a8d51f0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-002.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-002.wav-1201d68ef6ccf16eafdbf55c3a8d51f0.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cijtqpij23hyd"
|
||||
path="res://.godot/imported/csoszogás-003.wav-086e7634716aecc8dbc7eed858e7467d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-003.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-003.wav-086e7634716aecc8dbc7eed858e7467d.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://tmflo6rp0cu4"
|
||||
path="res://.godot/imported/csoszogás-004.wav-c12818e7d926e81b053b3dcc5de51433.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-004.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-004.wav-c12818e7d926e81b053b3dcc5de51433.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c3bl5rkqf1dn7"
|
||||
path="res://.godot/imported/csoszogás-005.wav-3716ba4dac65b71ef584b204a8fe356a.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-005.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-005.wav-3716ba4dac65b71ef584b204a8fe356a.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cueon12gi7jeh"
|
||||
path="res://.godot/imported/csoszogás-006.wav-bbcbf84f4582db64b5b168730ba99bf1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-006.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-006.wav-bbcbf84f4582db64b5b168730ba99bf1.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Binary file not shown.
|
|
@ -1,24 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://ccospbyrg6sb1"
|
||||
path="res://.godot/imported/csoszogás-007.wav-cc3d3e75eee70b17ab5de5855a9e1d1d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/walking/shuffle/csoszogás-007.wav"
|
||||
dest_files=["res://.godot/imported/csoszogás-007.wav-cc3d3e75eee70b17ab5de5855a9e1d1d.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
|
|
@ -16,7 +16,6 @@ general/updates_per_second=100
|
|||
|
||||
config/name="breadwinner"
|
||||
config/features=PackedStringArray("4.7", "Forward Plus")
|
||||
run/max_fps=60
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[audio]
|
||||
|
|
@ -37,6 +36,8 @@ window/size/viewport_width=1920
|
|||
window/size/viewport_height=1080
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
window/vsync/vsync_mode=0
|
||||
window/max_fps=60
|
||||
|
||||
[editor]
|
||||
|
||||
|
|
@ -185,11 +186,13 @@ open_menu={
|
|||
equip={
|
||||
"deadzone": 0.2,
|
||||
"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":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
}
|
||||
drop={
|
||||
"deadzone": 0.2,
|
||||
"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":71,"key_label":0,"unicode":103,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
}
|
||||
select_item_1={
|
||||
|
|
@ -258,6 +261,11 @@ toggle_console={
|
|||
"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":47,"key_label":0,"unicode":45,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
show_debug_menu={
|
||||
"deadzone": 0.2,
|
||||
"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":4194333,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
[gd_scene format=3 uid="uid://dgccyj4g0rp52"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://desjwy54cjos8" path="res://shaders/blur_shader.gdshader" id="1_dt8en"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_aghy0"]
|
||||
shader = ExtResource("1_dt8en")
|
||||
shader_parameter/blur_amount = 2.5
|
||||
|
||||
[node name="GrabPrompt" type="Control" unique_id=318901794]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="." unique_id=1898441113]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.4
|
||||
anchor_top = 0.4
|
||||
anchor_right = 0.6
|
||||
anchor_bottom = 0.5
|
||||
|
||||
[node name="Panel" type="Panel" parent="AspectRatioContainer" unique_id=530766557]
|
||||
material = SubResource("ShaderMaterial_aghy0")
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="AspectRatioContainer" unique_id=1563300647]
|
||||
layout_mode = 2
|
||||
text = "[R] to equip"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
[gd_scene format=3 uid="uid://c02fkimxlbrje"]
|
||||
|
||||
[ext_resource type="Shader" uid="uid://desjwy54cjos8" path="res://shaders/blur_shader.gdshader" id="1_sseo3"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_aghy0"]
|
||||
shader = ExtResource("1_sseo3")
|
||||
shader_parameter/blur_amount = 2.5
|
||||
|
||||
[node name="GrabPrompt" type="Control" unique_id=318901794]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="." unique_id=1898441113]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.4
|
||||
anchor_top = 0.4
|
||||
anchor_right = 0.6
|
||||
anchor_bottom = 0.5
|
||||
|
||||
[node name="Panel" type="Panel" parent="AspectRatioContainer" unique_id=530766557]
|
||||
material = SubResource("ShaderMaterial_aghy0")
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="AspectRatioContainer" unique_id=1563300647]
|
||||
layout_mode = 2
|
||||
text = "[LMB] grab"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
|
@ -5,7 +5,7 @@ extends Node
|
|||
@onready var flashlight: SpotLight3D = %Flashlight
|
||||
@onready var sound_controller: Node = %SoundController
|
||||
@onready var cursor_raycast: RayCast3D = %CursorRaycast
|
||||
@onready var popup_panels: Control = %PopupPanels
|
||||
@onready var prompt: Control = %Prompt
|
||||
@onready var stamina_reset: Timer = %StaminaReset
|
||||
@onready var player: CharacterBody3D = $"../.."
|
||||
@onready var procedural_camera_mover: Node = %ProceduralCameraMover
|
||||
|
|
@ -13,7 +13,7 @@ extends Node
|
|||
@onready var hold_position: Marker3D = %HoldPosition
|
||||
@onready var player_manager: Node = %PlayerManager
|
||||
@onready var ui: Control = %PlayerUi
|
||||
|
||||
@onready var debug_menu: Control = %DebugMenu
|
||||
|
||||
var sensitivity: float = 0.002
|
||||
|
||||
|
|
@ -91,6 +91,9 @@ func _process(delta: float) -> void:
|
|||
if Input.is_action_just_pressed("open_menu"):
|
||||
ui_handler.toggle_menu()
|
||||
|
||||
if Input.is_action_just_pressed("show_debug_menu"):
|
||||
debug_menu.visible = !debug_menu.visible
|
||||
|
||||
if Input.is_action_just_pressed("select_item_1"):
|
||||
player_manager.select_item(0)
|
||||
|
||||
|
|
@ -120,13 +123,13 @@ func _process(delta: float) -> void:
|
|||
held_object = hit_object
|
||||
held_object.gravity_scale = 0.0
|
||||
held_object.angular_damp = 5.0
|
||||
popup_panels.visible = false
|
||||
prompt.visible = false
|
||||
|
||||
if Input.is_action_just_released("grab") and held_object != null:
|
||||
held_object.gravity_scale = 1.0
|
||||
held_object.angular_damp = 0.0
|
||||
held_object = null
|
||||
popup_panels.visible = true
|
||||
prompt.visible = true
|
||||
|
||||
if Input.is_action_just_pressed("equip"):
|
||||
if cursor_raycast.is_colliding():
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
[ext_resource type="Script" uid="uid://bawpnca3v51gv" path="res://scenes/player/player.gd" id="1_76ube"]
|
||||
[ext_resource type="PackedScene" uid="uid://bsccbqq04umeg" path="res://scenes/player/player_ui.tscn" id="2_rkbax"]
|
||||
[ext_resource type="PackedScene" uid="uid://y5f3db7clptv" path="res://scenes/player/in_game_menu.tscn" id="3_g1dw6"]
|
||||
[ext_resource type="PackedScene" uid="uid://c57oxgn18vrdv" path="res://scenes/player/debug_menu.tscn" id="12_gx1jg"]
|
||||
[ext_resource type="PackedScene" uid="uid://c02fkimxlbrje" path="res://scenes/player/prompt.tscn" id="13_ugbui"]
|
||||
[ext_resource type="Script" uid="uid://dr2lwciaohf6f" path="res://scenes/player/movement_component.gd" id="60_s3g0c"]
|
||||
[ext_resource type="Script" uid="uid://cjk6a0da11ge6" path="res://scenes/player/procedural_camera_mover_component.gd" id="61_hggc2"]
|
||||
[ext_resource type="Script" uid="uid://v8er7yn0hdh8" path="res://scenes/player/sound_controller_component.gd" id="62_b2j0d"]
|
||||
|
|
@ -80,7 +82,6 @@ unique_name_in_owner = true
|
|||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.53598464, 0)
|
||||
script = ExtResource("62_jbx34")
|
||||
reverb_enabled = false
|
||||
reverb_volume_db = -12.0
|
||||
reverb_fadeintime = -1.0
|
||||
reverb_fadeouttime = -1.0
|
||||
|
|
@ -89,7 +90,6 @@ metadata/_custom_type_script = "uid://y8x4svl5kej2"
|
|||
[node name="HeadTexture" type="AudioStreamPlayer3D" parent="CameraPivot/Head" unique_id=732916843]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("62_jbx34")
|
||||
reverb_enabled = false
|
||||
metadata/_custom_type_script = "uid://y8x4svl5kej2"
|
||||
|
||||
[node name="PlayerCamera" type="Camera3D" parent="CameraPivot" unique_id=303347613]
|
||||
|
|
@ -138,15 +138,13 @@ unique_name_in_owner = true
|
|||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="PopupPanels" type="Control" parent="." unique_id=305048227]
|
||||
[node name="DebugMenu" parent="." unique_id=890382686 instance=ExtResource("12_gx1jg")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
visible = false
|
||||
|
||||
[node name="Prompt" parent="." unique_id=318901794 instance=ExtResource("13_ugbui")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
|
||||
[node name="Cursor" type="TextureRect" parent="." unique_id=785138925]
|
||||
unique_name_in_owner = true
|
||||
|
|
@ -177,7 +175,6 @@ one_shot = true
|
|||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.43042383, -0.90646136, 0)
|
||||
script = ExtResource("62_jbx34")
|
||||
reverb_enabled = false
|
||||
reverb_volume_db = -12.0
|
||||
reverb_fadeintime = -1.0
|
||||
reverb_fadeouttime = -1.0
|
||||
|
|
@ -186,7 +183,6 @@ metadata/_custom_type_script = "uid://y8x4svl5kej2"
|
|||
[node name="LeftFootTexture" type="AudioStreamPlayer3D" parent="SoundEmitters/LeftFoot" unique_id=1541799094]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("62_jbx34")
|
||||
reverb_enabled = false
|
||||
reverb_volume_db = -12.0
|
||||
reverb_fadeintime = -1.0
|
||||
reverb_fadeouttime = -1.0
|
||||
|
|
@ -196,7 +192,6 @@ metadata/_custom_type_script = "uid://y8x4svl5kej2"
|
|||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3428033, -0.8860581, 0)
|
||||
script = ExtResource("62_jbx34")
|
||||
reverb_enabled = false
|
||||
reverb_volume_db = -12.0
|
||||
reverb_fadeintime = -1.0
|
||||
reverb_fadeouttime = -1.0
|
||||
|
|
@ -205,7 +200,6 @@ metadata/_custom_type_script = "uid://y8x4svl5kej2"
|
|||
[node name="RightFootTexture" type="AudioStreamPlayer3D" parent="SoundEmitters/RightFoot" unique_id=370583799]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("62_jbx34")
|
||||
reverb_enabled = false
|
||||
reverb_volume_db = -12.0
|
||||
reverb_fadeintime = -1.0
|
||||
reverb_fadeouttime = -1.0
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ func drop_item(index: int = selected_item):
|
|||
if object.is_inside_tree():
|
||||
object.reparent(get_tree().current_scene, true)
|
||||
|
||||
object.collision_layer = 1
|
||||
object.collision_layer = 17
|
||||
object.add_to_group("equippable")
|
||||
|
||||
for child in object.get_children():
|
||||
|
|
|
|||
|
|
@ -6,12 +6,9 @@ extends Node
|
|||
@export var UI_MOVEMENT_SPEED = 15.0 ##how fast the UI moves when you move the camera
|
||||
@export var UI_MOVEMENT_VELOCITY_MULTIPLIER = 2.0 ##how much the ui leans when walking or strafing
|
||||
|
||||
@export var GRAB_PANEL: PackedScene = preload("res://scenes/player/grab_prompt.tscn")
|
||||
@export var EQUIP_PANEL: PackedScene = preload("res://scenes/player/equip_prompt.tscn")
|
||||
|
||||
@onready var prompt: Node = %Prompt
|
||||
@onready var in_game_menu: Control = %InGameMenu
|
||||
@onready var ui: Control = %PlayerUi
|
||||
@onready var popup_panels: Control = %PopupPanels
|
||||
@onready var player_state: Node = %PlayerState
|
||||
@onready var player_manager: Node = %PlayerManager
|
||||
@onready var player: CharacterBody3D = $"../.."
|
||||
|
|
@ -21,41 +18,39 @@ extends Node
|
|||
const SELECTED_COLOR = 0xcfcfcf78
|
||||
const UNSELECTED_COLOR = 0x3d3d3d78
|
||||
|
||||
var action_panel = null
|
||||
var action_panel_body = null
|
||||
|
||||
func _on_action_finder_body_entered(body: Node3D) -> void:
|
||||
if body != null:
|
||||
if body.is_in_group("grabbable"):
|
||||
action_panel = GRAB_PANEL.instantiate()
|
||||
if body.is_in_group("equippable"):
|
||||
action_panel = EQUIP_PANEL.instantiate()
|
||||
|
||||
popup_panels.add_child(action_panel)
|
||||
prompt.change_text("[LMB] to grab")
|
||||
elif body.is_in_group("equippable"):
|
||||
prompt.change_text("[R] to equip")
|
||||
else:
|
||||
return
|
||||
action_panel_body = body
|
||||
prompt.position = -(cursor.position - player_camera.unproject_position(action_panel_body.global_position)) / 2
|
||||
prompt.visible = true
|
||||
|
||||
func _on_action_finder_body_exited(body: Node3D) -> void:
|
||||
if body != null and body == action_panel_body:
|
||||
popup_panels.remove_child(action_panel)
|
||||
action_panel = null
|
||||
action_panel_body = null
|
||||
prompt.visible = false
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if action_panel != null:
|
||||
if action_panel_body != null:
|
||||
var target_position = cursor.position - player_camera.unproject_position(action_panel_body.global_position)
|
||||
action_panel.position = action_panel.position.lerp(-target_position / 2, delta * 50)
|
||||
prompt.position = prompt.position.lerp(-target_position / 2, delta * 50)
|
||||
|
||||
func toggle_menu():
|
||||
if !in_game_menu.visible:
|
||||
ui.visible = false
|
||||
popup_panels.visible = false
|
||||
in_game_menu.visible = true
|
||||
cursor.visible = false
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
player_state.in_menu = true
|
||||
else:
|
||||
ui.visible = true
|
||||
popup_panels.visible = true
|
||||
in_game_menu.visible = false
|
||||
cursor.visible = true
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
// Fetches the screen texture with mipmaps enabled for the blur effect
|
||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_linear_mipmap;
|
||||
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
// Allows you to adjust the blur strength in the inspector
|
||||
uniform float blur_amount : hint_range(0.0, 5.0) = 2.5;
|
||||
|
|
|
|||
Loading…
Reference in a new issue