New SFX and (supposedly) spatial SFX
This commit is contained in:
parent
d7d4e21005
commit
a5fe4bf0a0
|
@ -277,7 +277,12 @@
|
|||
Position Offset: {x: 0, y: 0.5, z: 0}
|
||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.Audio.SoundLoopEmitter
|
||||
Enabled: true
|
||||
clipHandlerName: "SFXWash65"
|
||||
clipPath: "event:/Props/washing_machine_loop"
|
||||
volume: 0.300000012
|
||||
- EID: 66
|
||||
Name: washingMachineDoor
|
||||
IsActive: true
|
||||
|
@ -418,7 +423,12 @@
|
|||
Position Offset: {x: 0, y: 0.5, z: 0}
|
||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.Audio.SoundLoopEmitter
|
||||
Enabled: true
|
||||
clipHandlerName: "SFXWash43"
|
||||
clipPath: "event:/Props/washing_machine_loop"
|
||||
volume: 0.300000012
|
||||
- EID: 44
|
||||
Name: washingMachineDoor
|
||||
IsActive: true
|
||||
|
@ -460,7 +470,12 @@
|
|||
Position Offset: {x: 0, y: 0.5, z: 0}
|
||||
Rotation Offset: {x: 0, y: 0, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
Scripts:
|
||||
- Type: SHADE_Scripting.Audio.SoundLoopEmitter
|
||||
Enabled: true
|
||||
clipHandlerName: "SFXWash42"
|
||||
clipPath: "event:/Props/washing_machine_loop"
|
||||
volume: 0.300000012
|
||||
- EID: 131081
|
||||
Name: washingMachineDoor
|
||||
IsActive: true
|
||||
|
@ -4121,6 +4136,7 @@
|
|||
Text: "Score: 0"
|
||||
Font: 176667660
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 206
|
||||
|
@ -4137,6 +4153,7 @@
|
|||
Text: "Time Left: 200"
|
||||
Font: 176667660
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 238
|
||||
|
@ -4153,6 +4170,7 @@
|
|||
Text: ""
|
||||
Font: 176667660
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 236
|
||||
|
@ -5302,6 +5320,7 @@
|
|||
Text: Game Pause
|
||||
Font: 176667660
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: false
|
||||
UI Component:
|
||||
Canvas ID: 458
|
||||
|
|
|
@ -464,6 +464,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak144
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -1652,6 +1654,8 @@
|
|||
Enabled: true
|
||||
threshHold: 4
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXWatermelonBreak464
|
||||
breakClipPath: event:/Props/impact_watermelon_break
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 500
|
||||
|
@ -2064,6 +2068,8 @@
|
|||
Enabled: true
|
||||
threshHold: 4
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXWatermelonBreak522
|
||||
breakClipPath: event:/Props/impact_watermelon_break
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 500
|
||||
|
@ -2374,6 +2380,8 @@
|
|||
Enabled: true
|
||||
threshHold: 4
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXWatermelonBreak156
|
||||
breakClipPath: event:/Props/impact_watermelon_break
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 500
|
||||
|
@ -2684,6 +2692,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak533
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -2903,6 +2913,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak538
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -3122,6 +3134,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.5
|
||||
ignoreRaccoon: true
|
||||
breakClipHandlerName: SFXEggBreak543
|
||||
breakClipPath: event:/Props/impact_egg
|
||||
- Type: Item
|
||||
Enabled: true
|
||||
Score: 10
|
||||
|
@ -3477,6 +3491,7 @@
|
|||
Text: My name is Brandon.
|
||||
Font: 174412429
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
UI Component:
|
||||
Canvas ID: 199
|
||||
|
@ -3518,6 +3533,7 @@
|
|||
Text: My name is Brandon.
|
||||
Font: 176667660
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
UI Component:
|
||||
Canvas ID: 199
|
||||
|
@ -3539,6 +3555,7 @@
|
|||
Text: X2
|
||||
Font: 174412429
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: true
|
||||
UI Component:
|
||||
Canvas ID: 199
|
||||
|
@ -3803,6 +3820,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak1
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 196
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4012,6 +4031,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak171
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 65703
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4221,6 +4242,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak150
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 149
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4430,6 +4453,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak145
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 488
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4639,6 +4664,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak492
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 493
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -4848,6 +4875,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak497
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 498
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5057,6 +5086,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak502
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 503
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5266,6 +5297,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak507
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 508
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5475,6 +5508,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak512
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 513
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -5684,6 +5719,8 @@
|
|||
Enabled: true
|
||||
threshHold: 0.100000001
|
||||
ignoreRaccoon: false
|
||||
breakClipHandlerName: SFXBreak517
|
||||
breakClipPath: event:/Props/impact_break
|
||||
- EID: 518
|
||||
Name: Piece1
|
||||
IsActive: false
|
||||
|
@ -6183,6 +6220,7 @@
|
|||
Text: Game Pause
|
||||
Font: 176667660
|
||||
Color: {x: 1, y: 1, z: 1, w: 1}
|
||||
Text Size: {x: 1, y: 1, z: 1}
|
||||
IsActive: false
|
||||
UI Component:
|
||||
Canvas ID: 10
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
using SHADE;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SHADE_Scripting.Audio
|
||||
{
|
||||
public class SoundLoopEmitter : Script
|
||||
{
|
||||
[SerializeField]
|
||||
private string clipHandlerName;
|
||||
|
||||
[SerializeField]
|
||||
private string clipPath;
|
||||
|
||||
public float volume;
|
||||
|
||||
protected override void awake()
|
||||
{
|
||||
AudioHandler.audioClipHandlers[clipHandlerName] = SHADE.Audio.CreateAudioClip(clipPath);
|
||||
}
|
||||
|
||||
protected override void start()
|
||||
{
|
||||
SHADE.Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers[clipHandlerName], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers[clipHandlerName].SetVolume(volume);
|
||||
AudioHandler.audioClipHandlers[clipHandlerName].Play();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
Name: CS_SoundLoopEmitter
|
||||
ID: 154714630
|
||||
Type: 9
|
|
@ -112,8 +112,14 @@ public partial class Homeowner1 : BehaviourTree
|
|||
AudioHandler.audioClipHandlers["BGMAdaptive"] = Audio.CreateAudioClip("event:/Music/bgm_adaptive");
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXFootstep"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_footsteps");
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXFootstep"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXDetectAh"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_detect_raccoon");
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXDetectAh"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXDetectSting"] = Audio.CreateAudioClip("event:/Music/stingers/player_detected");
|
||||
AudioHandler.audioClipHandlers["SFXHumming"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_humming");
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXHumming"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].SetVolume(0.15f);
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].Play();
|
||||
|
||||
if (aiInstance != null && aiInstance != this)
|
||||
RemoveScript<Homeowner1>();
|
||||
|
|
|
@ -14,6 +14,12 @@ public class Breakable : Script
|
|||
public bool isBreak { get; set; }
|
||||
private List<GameObject> itemPieces = new List<GameObject>();
|
||||
|
||||
[SerializeField]
|
||||
private string breakClipHandlerName;
|
||||
|
||||
[SerializeField]
|
||||
private string breakClipPath;
|
||||
|
||||
protected override void awake()
|
||||
{
|
||||
rb = GetComponent<RigidBody>();
|
||||
|
@ -32,7 +38,7 @@ public class Breakable : Script
|
|||
|
||||
isBreak = false;
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXBreak"] = Audio.CreateAudioClip("event:/Props/impact_break");
|
||||
AudioHandler.audioClipHandlers[breakClipHandlerName] = Audio.CreateAudioClip(breakClipPath);
|
||||
}
|
||||
|
||||
protected override void update()
|
||||
|
@ -76,7 +82,9 @@ public class Breakable : Script
|
|||
|
||||
GameManager.Instance.itemShatter = false;
|
||||
isBreak = false;
|
||||
AudioHandler.audioClipHandlers["SFXBreak"].Play();
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers[breakClipHandlerName], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers[breakClipHandlerName].Play();
|
||||
//Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers[breakClipHandlerName]);
|
||||
GameObject.SetActive(false);
|
||||
}
|
||||
}
|
|
@ -121,11 +121,15 @@ public class Item : Script
|
|||
|
||||
if (playSound)
|
||||
{
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXImpactElastic"], GameObject.EntityId);
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXImpactHard"], GameObject.EntityId);
|
||||
if (currCategory == ItemCategory.LIGHT)
|
||||
AudioHandler.audioClipHandlers["SFXImpactElastic"].Play();
|
||||
else if (currCategory == ItemCategory.MEDIUM || currCategory == ItemCategory.HEAVY)
|
||||
AudioHandler.audioClipHandlers["SFXImpactHard"].Play();
|
||||
playSound = false;
|
||||
Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers["SFXImpactElastic"]);
|
||||
Audio.DetachAudioClipFromObject(AudioHandler.audioClipHandlers["SFXImpactHard"]);
|
||||
}
|
||||
|
||||
if (info.GameObject.GetScript<Homeowner1>() && !returnBack)
|
||||
|
|
|
@ -91,10 +91,6 @@ public class GameManager : Script
|
|||
AudioHandler.audioClipHandlers["KitchenAmbience"] = Audio.CreateAudioClip("event:/Ambience/roomtone_kitchen");
|
||||
AudioHandler.audioClipHandlers["KitchenAmbience"].Play();
|
||||
|
||||
AudioHandler.audioClipHandlers["SFXHumming"] = Audio.CreateAudioClip("event:/Homeowner/homeowner_humming");
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].SetVolume(0.15f);
|
||||
AudioHandler.audioClipHandlers["SFXHumming"].Play();
|
||||
|
||||
if (SceneFadeInOut.Instance != null)
|
||||
SceneFadeInOut.Instance.CallFadeOut();
|
||||
Application.IsCursorVisible = false;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
using SHADE;
|
||||
using SHADE_Scripting.Audio;
|
||||
using System;
|
||||
|
||||
public class JumpPad : Script
|
||||
{
|
||||
protected override void awake()
|
||||
{
|
||||
AudioHandler.audioClipHandlers["SFXJumpPad"] = Audio.CreateAudioClip("event:/Props/jumppad_boing");
|
||||
}
|
||||
|
||||
protected override void update()
|
||||
|
@ -15,6 +17,8 @@ public class JumpPad : Script
|
|||
{
|
||||
if (info.GameObject.GetScript<PlayerController>() && info.GameObject.GetScript<PlayerController>().currentState == PlayerController.RaccoonStates.FALLING)
|
||||
{
|
||||
Audio.AttachAudioClipToObject(AudioHandler.audioClipHandlers["SFXJumpPad"], GameObject.EntityId);
|
||||
AudioHandler.audioClipHandlers["SFXJumpPad"].Play();
|
||||
info.GameObject.GetScript<PlayerController>().landedOnJumpPad = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue