-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dogdie233/dev
Dev
- Loading branch information
Showing
20 changed files
with
593 additions
and
137 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!241 &24100000 | ||
AudioMixerController: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: NewAudioMixer | ||
m_OutputGroup: {fileID: 0} | ||
m_MasterGroup: {fileID: 24300002} | ||
m_Snapshots: | ||
- {fileID: 24500006} | ||
m_StartSnapshot: {fileID: 24500006} | ||
m_SuspendThreshold: -80 | ||
m_EnableSuspend: 1 | ||
m_UpdateMode: 0 | ||
m_ExposedParameters: [] | ||
m_AudioMixerGroupViews: | ||
- guids: | ||
- 2e56caa10b03d2b48aab4d11c12021f7 | ||
- 322533cf3b9bba54584be71d6bc4c36f | ||
- 63b5d0aadf6defc4781ccf27dcd3212e | ||
name: View | ||
m_CurrentViewIndex: 0 | ||
m_TargetSnapshot: {fileID: 24500006} | ||
--- !u!243 &24300002 | ||
AudioMixerGroupController: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: Master | ||
m_AudioMixer: {fileID: 24100000} | ||
m_GroupID: 2e56caa10b03d2b48aab4d11c12021f7 | ||
m_Children: | ||
- {fileID: 243159630443108008} | ||
- {fileID: 243736800746631566} | ||
m_Volume: 85383db9e6fd2ad4ba49edc92f6a7a9f | ||
m_Pitch: f99a7c2f1d68ef64eb65af7db3f17ed1 | ||
m_Effects: | ||
- {fileID: 24400004} | ||
m_UserColorIndex: 0 | ||
m_Mute: 0 | ||
m_Solo: 0 | ||
m_BypassEffects: 0 | ||
--- !u!244 &24400004 | ||
AudioMixerEffectController: | ||
m_ObjectHideFlags: 3 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: | ||
m_EffectID: 86d94f750707f2d4f9cb7c6464b9d5a1 | ||
m_EffectName: Attenuation | ||
m_MixLevel: 7e9ab68080b4c9e46b36a29d476d393c | ||
m_Parameters: [] | ||
m_SendTarget: {fileID: 0} | ||
m_EnableWetMix: 0 | ||
m_Bypass: 0 | ||
--- !u!245 &24500006 | ||
AudioMixerSnapshotController: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: Snapshot | ||
m_AudioMixer: {fileID: 24100000} | ||
m_SnapshotID: cc1460d2ebb162843827ceb9fc034609 | ||
m_FloatValues: {} | ||
m_TransitionOverrides: {} | ||
--- !u!243 &243159630443108008 | ||
AudioMixerGroupController: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: BackGroundMusic | ||
m_AudioMixer: {fileID: 24100000} | ||
m_GroupID: 322533cf3b9bba54584be71d6bc4c36f | ||
m_Children: [] | ||
m_Volume: 787fd58580bbb35458e71c261e11cc44 | ||
m_Pitch: 26725e43732261647832ccb90cc7079a | ||
m_Effects: | ||
- {fileID: 244373443531088772} | ||
m_UserColorIndex: 0 | ||
m_Mute: 0 | ||
m_Solo: 0 | ||
m_BypassEffects: 0 | ||
--- !u!243 &243736800746631566 | ||
AudioMixerGroupController: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: Effect | ||
m_AudioMixer: {fileID: 24100000} | ||
m_GroupID: 63b5d0aadf6defc4781ccf27dcd3212e | ||
m_Children: [] | ||
m_Volume: 6de58d687e55c0a4fa82619c024845d7 | ||
m_Pitch: 18cc243afd30f214bb836ca7698be735 | ||
m_Effects: | ||
- {fileID: 244419882805022256} | ||
m_UserColorIndex: 0 | ||
m_Mute: 0 | ||
m_Solo: 0 | ||
m_BypassEffects: 0 | ||
--- !u!244 &244373443531088772 | ||
AudioMixerEffectController: | ||
m_ObjectHideFlags: 3 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: | ||
m_EffectID: ecb49877185562e44936148d9fd39962 | ||
m_EffectName: Attenuation | ||
m_MixLevel: b92ea95f9be369b43a29ec95d0c682e2 | ||
m_Parameters: [] | ||
m_SendTarget: {fileID: 0} | ||
m_EnableWetMix: 0 | ||
m_Bypass: 0 | ||
--- !u!244 &244419882805022256 | ||
AudioMixerEffectController: | ||
m_ObjectHideFlags: 3 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: | ||
m_EffectID: 5e443c88f838b1144872ebb4c03e53cc | ||
m_EffectName: Attenuation | ||
m_MixLevel: 8ec2a7a74e8ab3444b52ddc990af0003 | ||
m_Parameters: [] | ||
m_SendTarget: {fileID: 0} | ||
m_EnableWetMix: 0 | ||
m_Bypass: 0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Event; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace Level | ||
{ | ||
public class BGMController : MonoBehaviour | ||
{ | ||
[SerializeField] private AudioSource source; | ||
|
||
private void Awake() | ||
{ | ||
if (source == null) { source = GetComponent<AudioSource>(); } | ||
EventManager.onStateChange.AddListener(OnStateChange, Priority.Lowest); | ||
} | ||
|
||
private StateChangeEventArgs OnStateChange(StateChangeEventArgs e) | ||
{ | ||
if (!e.canceled) | ||
{ | ||
if (e.newState == GameState.Playing) { source.Play(); } | ||
if (e.newState == GameState.WaitingRespawn) { source.Pause(); } | ||
} | ||
return e; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.