SHADE_Y3/Assets/Scripts/SC_SoundsBoard.cs

84 lines
2.5 KiB
C#
Raw Normal View History

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