2022-11-20 16:27:39 +08:00
|
|
|
|
using SHADE;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class SoundsBoard : Script
|
|
|
|
|
{
|
2023-03-02 16:26:49 +08:00
|
|
|
|
AudioClipHandler test;
|
2022-11-20 16:27:39 +08:00
|
|
|
|
protected override void awake()
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* event:/UI/failure
|
|
|
|
|
event:/UI/mouse_down_element
|
|
|
|
|
event:/UI/mouse_down_empty
|
|
|
|
|
event:/UI/mouse_enter_element
|
|
|
|
|
event:/UI/mouse_exit_element
|
|
|
|
|
event:/UI/success
|
|
|
|
|
|
|
|
|
|
event:/Raccoon/raccoon_footsteps
|
|
|
|
|
event:/Raccoon/raccoon_throw
|
|
|
|
|
|
|
|
|
|
event:/Props/impact_hard
|
|
|
|
|
event:/Props/impact_elastic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event:/Music/player_undetected
|
|
|
|
|
event:/Music/player_detected
|
|
|
|
|
|
|
|
|
|
event:/Music/stingers/player_detected
|
|
|
|
|
event:/Music/stingers/item_scored
|
|
|
|
|
|
|
|
|
|
event:/Homeowner/homeowner_humming
|
|
|
|
|
event:/Homeowner/homeowner_footsteps
|
|
|
|
|
event:/Homeowner/homeowner_detect_raccoon
|
|
|
|
|
*/
|
2023-03-02 16:26:49 +08:00
|
|
|
|
test = Audio.CreateAudioClip("event:/Music/player_undetected");
|
|
|
|
|
Audio.AddAudioClipToSFXChannelGroup(test);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void start()
|
|
|
|
|
{
|
|
|
|
|
test.Play();
|
2022-11-20 16:27:39 +08:00
|
|
|
|
}
|
|
|
|
|
protected override void update()
|
|
|
|
|
{
|
2023-03-02 16:26:49 +08:00
|
|
|
|
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.Q))
|
2023-03-02 16:26:49 +08:00
|
|
|
|
test.Play();
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.W))
|
2023-03-02 16:26:49 +08:00
|
|
|
|
test.Stop(true);
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.E))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/UI/mouse_enter_element");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.R))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/UI/mouse_exit_element");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.T))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/UI/success");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.Y))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Raccoon/raccoon_throw");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.U))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Props/impact_hard");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.I))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Music/player_undetected");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.O))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Music/player_detected");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.P))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Music/stingers/player_detected");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.A))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Music/stingers/item_scored");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.S))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Homeowner/homeowner_humming");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.D))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Homeowner/homeowner_footsteps");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.F))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Homeowner/homeowner_detect_raccoon");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.G))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Music/player_undetected");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.H))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Raccoon/raccoon_footsteps");
|
2022-11-21 21:01:44 +08:00
|
|
|
|
if (Input.GetKeyDown(Input.KeyCode.J))
|
2022-11-20 16:27:39 +08:00
|
|
|
|
Audio.PlayBGMOnce2D("event:/Props/impact_elastic");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|