Add music throughout. Start work on the prediction side pannels
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70ed09a0a6f41796aa8216ebc6fa3e65
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+1800
-124
File diff suppressed because it is too large
Load Diff
@@ -289,6 +289,135 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100395801}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &198525840
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 198525841}
|
||||
- component: {fileID: 198525842}
|
||||
m_Layer: 0
|
||||
m_Name: Music
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &198525841
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 198525840}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 960565295}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &198525842
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 198525840}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 8300000, guid: 70ed09a0a6f41796aa8216ebc6fa3e65, type: 3}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &203844586
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1237,6 +1366,162 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 933994408}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &960565292
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 960565295}
|
||||
- component: {fileID: 960565294}
|
||||
- component: {fileID: 960565296}
|
||||
m_Layer: 0
|
||||
m_Name: AudioManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &960565294
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 960565292}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!4 &960565295
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 960565292}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 26.30075, y: -2.44659, z: 18.84061}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 198525841}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &960565296
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 960565292}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 083c97d5b5c3da8408586386bf771491, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
clips:
|
||||
- key: WordAdd
|
||||
value: {fileID: 8300000, guid: b14c103790e60da69ae477940a6f3951, type: 3}
|
||||
- key: WordRemove
|
||||
value: {fileID: 8300000, guid: 519cfc8632246818cb25372742c8fd8f, type: 3}
|
||||
- key: Select
|
||||
value: {fileID: 8300000, guid: 8e32ddd55d6efe6e383b392b08cbe107, type: 3}
|
||||
- key: Horse
|
||||
value: {fileID: 8300000, guid: 6d93a8a12ea0f403088d1e901fd4f719, type: 3}
|
||||
speech:
|
||||
- {fileID: 8300000, guid: 8031864ce1c982d53913a027ea97577f, type: 3}
|
||||
- {fileID: 8300000, guid: 06e03c52b213e965ab19f5ee87a7c02a, type: 3}
|
||||
- {fileID: 8300000, guid: 750d18f95edb138389d25fa240d4bebe, type: 3}
|
||||
--- !u!1 &961739749
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2751,3 +3036,4 @@ SceneRoots:
|
||||
- {fileID: 1358392665}
|
||||
- {fileID: 677484326}
|
||||
- {fileID: 516359711}
|
||||
- {fileID: 960565295}
|
||||
|
||||
@@ -5,7 +5,14 @@ using Utils.Utils;
|
||||
|
||||
public class AudioManager : Singleton<AudioManager>
|
||||
{
|
||||
//aaaaa theres nicer syntax for this i think
|
||||
protected override bool dontDestroyOnLoad()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private AudioSource audioSource;
|
||||
private AudioSource musicAudioSource;
|
||||
|
||||
[SerializeField]
|
||||
private List<GameEntry<AudioClip>> clips = new List<GameEntry<AudioClip>>();
|
||||
@@ -19,6 +26,13 @@ public class AudioManager : Singleton<AudioManager>
|
||||
{
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
audioSource.pitch = 1;
|
||||
|
||||
musicAudioSource = transform.Find("Music").GetComponent<AudioSource>();
|
||||
musicAudioSource.loop = true;
|
||||
if (!musicAudioSource.isPlaying)
|
||||
{
|
||||
musicAudioSource.Play();
|
||||
}
|
||||
}
|
||||
|
||||
public void PlaySound(string type)
|
||||
@@ -35,4 +49,20 @@ public class AudioManager : Singleton<AudioManager>
|
||||
audioSource.PlayOneShot(speech[index], 1.5f);
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
transform.position = Camera.main.transform.position;
|
||||
}
|
||||
|
||||
public void PlayMusic()
|
||||
{
|
||||
if (musicAudioSource.isPlaying) return;
|
||||
musicAudioSource.Play();
|
||||
}
|
||||
|
||||
public void StopMusic()
|
||||
{
|
||||
musicAudioSource.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,12 +261,14 @@ public class CameraController : MonoBehaviour
|
||||
|
||||
if (guard != null)
|
||||
{
|
||||
AudioManager.Instance.PlaySound("WordAdd");
|
||||
currentGuardManager = guard;
|
||||
guard.isfocussed = 2;
|
||||
if (talkButton != null) talkButton.gameObject.SetActive(true);
|
||||
}
|
||||
else if (door != null)
|
||||
{
|
||||
AudioManager.Instance.PlaySound("WordAdd");
|
||||
currentDoorManager = door;
|
||||
door.isfocussed = 2;
|
||||
if (doorButton != null) doorButton.gameObject.SetActive(true);
|
||||
@@ -277,6 +279,7 @@ public class CameraController : MonoBehaviour
|
||||
// TRIPWIRE 4: ADD THIS LINE HERE
|
||||
Debug.Log("💨 Raycast hit nothing on the Interactable layer. Returning to main camera.");
|
||||
ReturnToMainCamera();
|
||||
AudioManager.Instance.PlaySound("WordRemove");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,8 +287,9 @@ public class CameraController : MonoBehaviour
|
||||
{
|
||||
if (currentGuardManager != null)
|
||||
{
|
||||
AudioManager.Instance.PlaySound("Select");
|
||||
DialogManager.Instance.StartDialog(currentGuardManager);
|
||||
talkButton.gameObject.SetActive(false);
|
||||
//talkButton.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +299,7 @@ public class CameraController : MonoBehaviour
|
||||
{
|
||||
// Add your door sequence logic here!
|
||||
Debug.Log("Door sequence started!");
|
||||
doorButton.gameObject.SetActive(false);
|
||||
//doorButton.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,11 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
return type;
|
||||
}
|
||||
|
||||
public string GetDescribeName()
|
||||
{
|
||||
return mod;
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
{
|
||||
return "Describe " + type;
|
||||
|
||||
@@ -141,6 +141,11 @@ public class GuardManager : MonoBehaviour, IDescribable
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public string GetDescribeName()
|
||||
{
|
||||
return mod;
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@ public class MainMenuController : MonoBehaviour
|
||||
|
||||
public void PlaySelect()
|
||||
{
|
||||
AudioManager.Instance.PlaySound("Select");
|
||||
if (GlobalStateManager.Instance.HighestLevel >= GlobalStateManager.Instance.levels.Count)
|
||||
{
|
||||
//handle edge case of completing all the levels
|
||||
@@ -48,11 +49,13 @@ public class MainMenuController : MonoBehaviour
|
||||
|
||||
public void LevelSelect()
|
||||
{
|
||||
AudioManager.Instance.PlaySound("WordAdd");
|
||||
InstantiateLevelButtons();
|
||||
}
|
||||
|
||||
public void BackSelect()
|
||||
{
|
||||
AudioManager.Instance.PlaySound("WordRemove");
|
||||
InitMenu.SetActive(true);
|
||||
LevelSelectMenu.SetActive(false);
|
||||
}
|
||||
@@ -78,7 +81,7 @@ public class MainMenuController : MonoBehaviour
|
||||
if (i <= GlobalStateManager.Instance.HighestLevel)
|
||||
{
|
||||
levelButton.GetComponentInChildren<Button>().onClick.AddListener(() => {
|
||||
|
||||
AudioManager.Instance.PlaySound("Select");
|
||||
GlobalStateManager.Instance.LoadSpecificLevel(levelIndex);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,6 +7,11 @@ public class PauseController : MonoBehaviour
|
||||
|
||||
public void TogglePause(bool on)
|
||||
{
|
||||
if (GlobalStateManager.Instance != null)
|
||||
{
|
||||
AudioManager.Instance.PlaySound("Select");
|
||||
}
|
||||
|
||||
pauseMenu.SetActive(on);
|
||||
Time.timeScale = on ? 0 : 1;
|
||||
}
|
||||
@@ -16,6 +21,7 @@ public class PauseController : MonoBehaviour
|
||||
TogglePause(false);
|
||||
if (GlobalStateManager.Instance != null)
|
||||
{
|
||||
AudioManager.Instance.PlaySound("Select");
|
||||
GlobalStateManager.Instance.MenuIntended = intended;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,10 @@ using Utils;
|
||||
public class StatusManager : Singleton<StatusManager>
|
||||
{
|
||||
public Transform doorPanel;
|
||||
public Transform doorPanelThoughts;
|
||||
public GameObject doorPrefab;
|
||||
public Transform guardPanel;
|
||||
public Transform guardPanelThoughts;
|
||||
public GameObject guardPrefab;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
@@ -25,11 +27,18 @@ public class StatusManager : Singleton<StatusManager>
|
||||
|
||||
public void PopulatePanels()
|
||||
{
|
||||
PopulatePanel(doorPanel, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanel, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), false);
|
||||
PopulatePanel(doorPanel, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),false, LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanel, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), false, false);
|
||||
|
||||
PopulatePanel(doorPanelThoughts, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),true, LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanelThoughts, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), true, false);
|
||||
|
||||
//hide side pannel if cup global mod, or if only one guard
|
||||
//add fallback to getdescribename
|
||||
//actually implement the setting of predictions
|
||||
}
|
||||
|
||||
private void PopulatePanel(Transform panel, GameObject template, List<IDescribable> items, bool hide)
|
||||
private void PopulatePanel(Transform panel, GameObject template, List<IDescribable> items, bool interactableType, bool hide)
|
||||
{
|
||||
foreach (Transform child in panel)
|
||||
{
|
||||
@@ -40,20 +49,28 @@ public class StatusManager : Singleton<StatusManager>
|
||||
{
|
||||
var obj = Instantiate(template, panel);
|
||||
|
||||
|
||||
var titleMesh = obj.transform.FindChildRecursive("TITLE").GetComponent<TextMeshProUGUI>();
|
||||
var descMesh = obj.transform.FindChildRecursive("DESC").GetComponent<TextMeshProUGUI>();
|
||||
|
||||
if (hide)
|
||||
if (!interactableType)
|
||||
{
|
||||
titleMesh.text = "???";
|
||||
descMesh.text = "???";
|
||||
if (hide)
|
||||
{
|
||||
titleMesh.text = "???";
|
||||
descMesh.text = "???";
|
||||
}
|
||||
else
|
||||
{
|
||||
titleMesh.text = item.GetName();
|
||||
descMesh.text = item.GetDescription();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
titleMesh.text = item.GetName();
|
||||
descMesh.text = item.GetDescription();
|
||||
titleMesh.text = item.GetDescribeName();
|
||||
descMesh.text = "Click to set prediction";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ namespace Utils
|
||||
public interface IDescribable
|
||||
{
|
||||
public string GetName();
|
||||
|
||||
public string GetDescribeName();
|
||||
|
||||
public string GetDescription();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user