diff --git a/attacks/wiz_zone.gd b/attacks/wiz_zone.gd index e93648d..a78d85b 100644 --- a/attacks/wiz_zone.gd +++ b/attacks/wiz_zone.gd @@ -2,7 +2,12 @@ class_name WizZone extends RigidBody2D @onready var zone: Area2D = $Area2D var stats: Stats +@export var cast_event: EventAsset +var cast_sfx: EventInstance +func _ready(): + cast_sfx = FMODRuntime.create_instance(cast_event) + cast_sfx.start() func collide(): for body in zone.get_overlapping_bodies(): diff --git a/attacks/wiz_zone.tscn b/attacks/wiz_zone.tscn index 64e992d..d93f68d 100644 --- a/attacks/wiz_zone.tscn +++ b/attacks/wiz_zone.tscn @@ -1,8 +1,16 @@ -[gd_scene load_steps=7 format=3 uid="uid://x1tw8sl2is6b"] +[gd_scene load_steps=8 format=3 uid="uid://x1tw8sl2is6b"] [ext_resource type="Shader" path="res://items/wave.gdshader" id="1_71a14"] [ext_resource type="Script" path="res://attacks/wiz_zone.gd" id="1_bnnnb"] +[sub_resource type="EventAsset" id="EventAsset_kf377"] +is_oneshot = true +min_distance = 1.0 +max_distance = 20.0 +path = "event:/Wizard Cast" +guid = "{9763df43-0a81-49ef-9c77-534d79280aa0}" +name = "Wizard Cast" + [sub_resource type="ShaderMaterial" id="ShaderMaterial_8ygun"] shader = ExtResource("1_71a14") shader_parameter/width = 24.0 @@ -71,6 +79,7 @@ radius = 24.0 mass = 0.02 lock_rotation = true script = ExtResource("1_bnnnb") +cast_event = SubResource("EventAsset_kf377") [node name="ColorRect" type="ColorRect" parent="."] material = SubResource("ShaderMaterial_8ygun") diff --git a/autoload/audio.gd b/autoload/audio.gd index b3b05aa..0357619 100644 --- a/autoload/audio.gd +++ b/autoload/audio.gd @@ -1,6 +1,6 @@ extends Node -enum SFX { Select, Back } +enum SFX { Select, Back, GrabItem } func play_sfx(sfx: SFX): match sfx: @@ -8,5 +8,7 @@ func play_sfx(sfx: SFX): FMODRuntime.play_one_shot_path("event:/UI_Select") SFX.Back: FMODRuntime.play_one_shot_path("event:/UI_Back") + SFX.GrabItem: + FMODRuntime.play_one_shot_path("event:/Grab Item") diff --git a/entities/hero/hero.tscn b/entities/hero/hero.tscn index e4a3e8b..0fe91fe 100644 --- a/entities/hero/hero.tscn +++ b/entities/hero/hero.tscn @@ -5,7 +5,7 @@ [ext_resource type="PackedScene" uid="uid://dgul0eolhcq2n" path="res://entities/stats.tscn" id="2_25foy"] [ext_resource type="Texture2D" uid="uid://d4ibrl4nmd57w" path="res://assets/MRMOTEXT_EX.png" id="2_g2vsp"] [ext_resource type="Script" path="res://entities/hero/FightZone.gd" id="5_xmbvs"] -[ext_resource type="EventAsset" uid="uid://cmdbapmvmglmv" path="res://addons/FMOD/editor/resources/events/{11055db4-7ce9-49b0-8c44-c8c5a71c834a}.tres" id="6_5ol6p"] +[ext_resource type="EventAsset" uid="uid://ctu8kway4nlaa" path="res://addons/FMOD/editor/resources/events/{11055db4-7ce9-49b0-8c44-c8c5a71c834a}.tres" id="6_5ol6p"] [ext_resource type="PackedScene" uid="uid://2upqhrf5ek4c" path="res://attacks/dash_manager.tscn" id="7_iljwf"] [ext_resource type="Script" path="res://entities/hero/ActiveZone.gd" id="8_3bxfe"] @@ -94,6 +94,7 @@ texture = SubResource("AtlasTexture_78j2y") [node name="FightZone" type="Area2D" parent="."] visible = false +show_behind_parent = true collision_layer = 0 collision_mask = 4 monitorable = false diff --git a/scenes/inventory.gd b/scenes/inventory.gd index f51a001..2a1944e 100644 --- a/scenes/inventory.gd +++ b/scenes/inventory.gd @@ -32,6 +32,7 @@ func is_full() -> bool: func add_item(item: Item): items.append(item) + Audio.play_sfx(Audio.SFX.GrabItem) update() diff --git a/sounds/Desktop/Master.bank b/sounds/Desktop/Master.bank index 33c40f9..d4d5ff2 100644 Binary files a/sounds/Desktop/Master.bank and b/sounds/Desktop/Master.bank differ diff --git a/sounds/Desktop/Master.strings.bank b/sounds/Desktop/Master.strings.bank index 4d2a616..8a91935 100644 Binary files a/sounds/Desktop/Master.strings.bank and b/sounds/Desktop/Master.strings.bank differ