Global Sounds system
This commit is contained in:
parent
5677971bf0
commit
ba3306c04c
15 changed files with 232 additions and 1 deletions
11
scripts/global_sound_player/global_sound_player.gd
Normal file
11
scripts/global_sound_player/global_sound_player.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
@tool
|
||||
@icon("global_sound_player.svg")
|
||||
class_name GlobalSoundPlayer
|
||||
extends Node
|
||||
|
||||
|
||||
@export_custom(0, "global_sound") var sound: StringName
|
||||
|
||||
|
||||
func play() -> void:
|
||||
GlobalSounds.play_sound(sound)
|
1
scripts/global_sound_player/global_sound_player.gd.uid
Normal file
1
scripts/global_sound_player/global_sound_player.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cg3hwyafaokvs
|
50
scripts/global_sound_player/global_sound_player.svg
Normal file
50
scripts/global_sound_player/global_sound_player.svg
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xml:space="preserve"
|
||||
width="16"
|
||||
height="16"
|
||||
version="1.0"
|
||||
viewBox="0 0 2.4 2.4"
|
||||
id="svg2"
|
||||
sodipodi:docname="global_sound_player.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs2" /><sodipodi:namedview
|
||||
id="namedview2"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:zoom="15.216732"
|
||||
inkscape:cx="8.8718131"
|
||||
inkscape:cy="5.0602193"
|
||||
inkscape:window-width="1362"
|
||||
inkscape:window-height="768"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" /><g
|
||||
id="g2"
|
||||
transform="matrix(0.80605275,0,0,0.8060853,0.50659596,0.52854067)"><path
|
||||
fill="#e0e0e0"
|
||||
d="M 1.252,0.15 A 0.1,0.1 0 0 0 1.17,0.18 L 0.6,0.75 H 0.318 C 0.225,0.75 0.15,0.817 0.15,0.9 v 0.6 c 0,0.083 0.075,0.15 0.168,0.15 H 0.6 L 1.17,2.22 C 1.236,2.287 1.35,2.24 1.35,2.146 V 0.256 A 0.106,0.106 0 0 0 1.252,0.15"
|
||||
paint-order="markers stroke fill"
|
||||
id="path1" /><path
|
||||
fill="none"
|
||||
stroke="#e0e0e0"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="0.165"
|
||||
d="m 1.575,0.675 c 0.45,0.525 0,1.05 0,1.05 m 0.3,-1.35 c 0.675,0.825 0,1.65 0,1.65"
|
||||
paint-order="markers stroke fill"
|
||||
id="path2" /></g><path
|
||||
fill="#e0e0e0"
|
||||
d="M 0.72037825,0.2668907 A 0.15624453,0.15624453 0 0 1 0.94219887,0.48699299 L 0.7543543,0.67483756 A 0.31242343,0.31242343 0 1 0 0.53331471,0.45379798 Z M 0.31125971,0.78738817 A 0.07810586,0.07810586 0 0 0 0.4217014,0.89782983 L 0.89033658,0.42919465 A 0.07810586,0.07810586 0 0 0 0.77989482,0.31875299 Z M 0.47903114,0.95000455 A 0.15624457,0.15624457 0 0 1 0.25721047,0.72990217 L 0.44505509,0.5420576 a 0.31242343,0.31242343 0 1 0 0.22103958,0.22088342 z"
|
||||
id="path1-0"
|
||||
style="stroke-width:0.0781059" /></svg>
|
After Width: | Height: | Size: 2.2 KiB |
37
scripts/global_sound_player/global_sound_player.svg.import
Normal file
37
scripts/global_sound_player/global_sound_player.svg.import
Normal file
|
@ -0,0 +1,37 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d228m7ctf8oxw"
|
||||
path="res://.godot/imported/global_sound_player.svg-1b6f31c64d0990ab1d53b6cd3019a357.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scripts/global_sound_player/global_sound_player.svg"
|
||||
dest_files=["res://.godot/imported/global_sound_player.svg-1b6f31c64d0990ab1d53b6cd3019a357.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
Loading…
Add table
Add a link
Reference in a new issue