#40 ajout d'un son de clic
This commit is contained in:
parent
22797a9ba3
commit
3bbb1cfcdc
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://0yr6b2jtuttm"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://0yr6b2jtuttm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://vhumsfntpqcl" path="res://gui/pointer/scripts/pointer.gd" id="1_1pe2k"]
|
||||
[ext_resource type="Texture2D" uid="uid://bspffyprdywgc" path="res://gui/pointer/assets/cursors/pointer.svg" id="2_q4bvb"]
|
||||
[ext_resource type="AudioStream" uid="uid://bym03qp4n6vep" path="res://gui/pointer/assets/sounds/click.wav" id="3_kj0cm"]
|
||||
|
||||
[node name="Pointer" type="Node"]
|
||||
process_mode = 3
|
||||
@ -28,3 +29,9 @@ layout_mode = 1
|
||||
offset_left = 26.0
|
||||
offset_right = 66.0
|
||||
offset_bottom = 23.0
|
||||
|
||||
[node name="Audio" type="Node" parent="."]
|
||||
|
||||
[node name="Click" type="AudioStreamPlayer" parent="Audio"]
|
||||
stream = ExtResource("3_kj0cm")
|
||||
volume_db = -15.0
|
||||
|
||||
@ -3,10 +3,15 @@ extends Node
|
||||
@export var default_cursor : Texture2D
|
||||
|
||||
var inspected_entity : InspectableEntity = null
|
||||
var player : Player # renseigné par Player
|
||||
|
||||
func _ready():
|
||||
Input.set_custom_mouse_cursor(default_cursor)
|
||||
|
||||
func _input(_event):
|
||||
if Input.is_action_just_pressed("interact"):
|
||||
$Audio/Click.play()
|
||||
|
||||
func _process(_delta):
|
||||
%Inspector.position = get_viewport().get_mouse_position()
|
||||
|
||||
@ -23,3 +28,4 @@ func stop_inspect_entity(entity : InspectableEntity):
|
||||
if inspected_entity == entity:
|
||||
%InspectorText.visible = false
|
||||
inspected_entity = null
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user