UI graphics and Sound #24

Merged
JanGross merged 2 commits from ui_graphics into master 2023-07-09 17:17:58 +02:00
10 changed files with 8042 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 738b7a0fc0107ef41a2d5d97ef0a6ee0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -5,9 +5,11 @@ using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
[RequireComponent(typeof(AudioSource))]
public class Journal : MonoBehaviour public class Journal : MonoBehaviour
{ {
public GameObject journal; public GameObject journal;
public AudioClip m_pageSound, m_openSound, m_closeSound;
private List<CharacterData> m_availableAdventurers = new List<CharacterData>(); private List<CharacterData> m_availableAdventurers = new List<CharacterData>();
public Transform adventurerPage; public Transform adventurerPage;
@@ -52,11 +54,13 @@ public class Journal : MonoBehaviour
adventurerPage.gameObject.SetActive(true); adventurerPage.gameObject.SetActive(true);
} }
journal.SetActive(true); journal.SetActive(true);
GetComponent<AudioSource>().PlayOneShot(m_openSound,1);
//PlayerController.Instance.cameraMovement = false; //PlayerController.Instance.cameraMovement = false;
} }
public void CloseJournal() public void CloseJournal()
{ {
GetComponent<AudioSource>().PlayOneShot(m_closeSound,1);
journal.SetActive(false); journal.SetActive(false);
adventurerPage.gameObject.SetActive(false); adventurerPage.gameObject.SetActive(false);
PlayerController.Instance.cameraMovement = true; PlayerController.Instance.cameraMovement = true;
@@ -89,6 +93,8 @@ public class Journal : MonoBehaviour
{ {
m_selectedAdventurer = ++m_selectedAdventurer % m_availableAdventurers.Count(); m_selectedAdventurer = ++m_selectedAdventurer % m_availableAdventurers.Count();
SetJournalAdventurerPage(m_selectedAdventurer); SetJournalAdventurerPage(m_selectedAdventurer);
AudioSource audio = GetComponent<AudioSource>();
audio.PlayOneShot(m_pageSound,1);
} }
public void PreviousAdventurer() public void PreviousAdventurer()
@@ -99,6 +105,8 @@ public class Journal : MonoBehaviour
m_selectedAdventurer = m_availableAdventurers.Count() - 1; m_selectedAdventurer = m_availableAdventurers.Count() - 1;
} }
SetJournalAdventurerPage(m_selectedAdventurer); SetJournalAdventurerPage(m_selectedAdventurer);
GetComponent<AudioSource>().PlayOneShot(m_pageSound);
} }
public void AssignAdventurer() public void AssignAdventurer()

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2b3239110a15c2c458a1bfa9479df4e1 guid: a7da724ddfd7bd840b47b6c9699deabb
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

BIN
Assets/Sounds/Book Close.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 451bd7638e5a31249b6fbcbfa1ed524a
AudioImporter:
externalObjects: {}
serializedVersion: 7
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:

BIN
Assets/Sounds/Book Open.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: fd39bd6850cc59d4caec9846abe40cb7
AudioImporter:
externalObjects: {}
serializedVersion: 7
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:

BIN
Assets/Sounds/Page_Flip.wav (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 9f4b6c8a11388384cbce1b85d03f053a
AudioImporter:
externalObjects: {}
serializedVersion: 7
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: