Update Dub Materi
This commit is contained in:
parent
a3e9255ede
commit
a9dde98f70
Binary file not shown.
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8729a23f90d0cf540adc803a0ff1df0d
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -13,7 +13,8 @@ MonoBehaviour:
|
||||||
m_Name: Materi Kesehatan Gigi
|
m_Name: Materi Kesehatan Gigi
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
materiSpecs:
|
materiSpecs:
|
||||||
- _name: 'Jenis Gigi: Gigi Susu & Gigi Permanen'
|
- dubbingName: Satu
|
||||||
|
_name: 'Jenis Gigi: Gigi Susu & Gigi Permanen'
|
||||||
_description: '1. Gigi Susu (20 gigi)
|
_description: '1. Gigi Susu (20 gigi)
|
||||||
|
|
||||||
Tumbuh saat kita masih kecil. Ada
|
Tumbuh saat kita masih kecil. Ada
|
||||||
|
|
@ -28,7 +29,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: b3c53c39b8e3781478a60cb894457382, type: 3}
|
_image: {fileID: 21300000, guid: b3c53c39b8e3781478a60cb894457382, type: 3}
|
||||||
- _name: Cara Menggosok Gigi
|
- dubbingName: Dua
|
||||||
|
_name: Cara Menggosok Gigi
|
||||||
_description: '1. Sikat gigi setelah sarapan dan sebelum tidur.
|
_description: '1. Sikat gigi setelah sarapan dan sebelum tidur.
|
||||||
|
|
||||||
2. Gunakan
|
2. Gunakan
|
||||||
|
|
@ -44,7 +46,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: f6a18068cc1d8f34c9088ca23852740a, type: 3}
|
_image: {fileID: 21300000, guid: f6a18068cc1d8f34c9088ca23852740a, type: 3}
|
||||||
- _name: Cara Menjaga Gigi Tetap Sehat
|
- dubbingName: Tiga
|
||||||
|
_name: Cara Menjaga Gigi Tetap Sehat
|
||||||
_description: '1. Sikat gigi 2x sehari menggunakan pasta gigi berfluoride.
|
_description: '1. Sikat gigi 2x sehari menggunakan pasta gigi berfluoride.
|
||||||
|
|
||||||
2.
|
2.
|
||||||
|
|
@ -60,32 +63,38 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: f6a18068cc1d8f34c9088ca23852740a, type: 3}
|
_image: {fileID: 21300000, guid: f6a18068cc1d8f34c9088ca23852740a, type: 3}
|
||||||
- _name: ' Makanan yang Perlu Dikurangi'
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: ' Makanan yang Perlu Dikurangi'
|
||||||
_description: Permen
|
_description: Permen
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 45d9a96883c1e734b9583af0ce96e8a4, type: 3}
|
_image: {fileID: 21300000, guid: 45d9a96883c1e734b9583af0ce96e8a4, type: 3}
|
||||||
- _name: ' Makanan yang Perlu Dikurangi'
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: ' Makanan yang Perlu Dikurangi'
|
||||||
_description: Es Batu
|
_description: Es Batu
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 31c367ffa92577f4cbb08c8073f2104a, type: 3}
|
_image: {fileID: 21300000, guid: 31c367ffa92577f4cbb08c8073f2104a, type: 3}
|
||||||
- _name: ' Makanan yang Perlu Dikurangi'
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: ' Makanan yang Perlu Dikurangi'
|
||||||
_description: Kopi
|
_description: Kopi
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 84f18b28c8faf5b4090b91fe542543c1, type: 3}
|
_image: {fileID: 21300000, guid: 84f18b28c8faf5b4090b91fe542543c1, type: 3}
|
||||||
- _name: ' Makanan yang Perlu Dikurangi'
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: ' Makanan yang Perlu Dikurangi'
|
||||||
_description: Minuman Bersoda
|
_description: Minuman Bersoda
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: e540bd7a9d38ac742aee7cdaa9c8a8c4, type: 3}
|
_image: {fileID: 21300000, guid: e540bd7a9d38ac742aee7cdaa9c8a8c4, type: 3}
|
||||||
- _name: ' Makanan yang Perlu Dikurangi'
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: ' Makanan yang Perlu Dikurangi'
|
||||||
_description: Cokelat
|
_description: Cokelat
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 2e4981ae98712034293150424d47d6ba, type: 3}
|
_image: {fileID: 21300000, guid: 2e4981ae98712034293150424d47d6ba, type: 3}
|
||||||
- _name: Mengapa Harus Rutin ke Dokter Gigi?
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: Mengapa Harus Rutin ke Dokter Gigi?
|
||||||
_description: 'a. Mencegah masalah gigi sejak dini.
|
_description: 'a. Mencegah masalah gigi sejak dini.
|
||||||
|
|
||||||
b. Menyelamatkan gigi
|
b. Menyelamatkan gigi
|
||||||
|
|
@ -100,3 +109,4 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: f6a18068cc1d8f34c9088ca23852740a, type: 3}
|
_image: {fileID: 21300000, guid: f6a18068cc1d8f34c9088ca23852740a, type: 3}
|
||||||
|
dubbingNameMateri:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ MonoBehaviour:
|
||||||
m_Name: Materi Penyakit Gigi
|
m_Name: Materi Penyakit Gigi
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
materiSpecs:
|
materiSpecs:
|
||||||
- _name: Penyebab Gigi Berlubang
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: Penyebab Gigi Berlubang
|
||||||
_description: 'a. Sering makan-minum yang manis dan asam.
|
_description: 'a. Sering makan-minum yang manis dan asam.
|
||||||
|
|
||||||
b. Malas menyikat
|
b. Malas menyikat
|
||||||
|
|
@ -26,7 +27,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 90aa73f8a0da7e64ba8fc39abf86a4e7, type: 3}
|
_image: {fileID: 21300000, guid: 90aa73f8a0da7e64ba8fc39abf86a4e7, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'a. Sariawan
|
_description: 'a. Sariawan
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -35,7 +37,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: fdb341e5199d737498a8485dbd8c66dc, type: 3}
|
_image: {fileID: 21300000, guid: fdb341e5199d737498a8485dbd8c66dc, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName: 1
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'b. Gigi Berlubang
|
_description: 'b. Gigi Berlubang
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -44,7 +47,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 90aa73f8a0da7e64ba8fc39abf86a4e7, type: 3}
|
_image: {fileID: 21300000, guid: 90aa73f8a0da7e64ba8fc39abf86a4e7, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'c. Gusi Berdarah
|
_description: 'c. Gusi Berdarah
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -53,7 +57,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: a463b4e2eed347d4e88c1d393bba0f07, type: 3}
|
_image: {fileID: 21300000, guid: a463b4e2eed347d4e88c1d393bba0f07, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName: DubbingSoal1
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'd. Gigi Tumbuh Tidak Rata
|
_description: 'd. Gigi Tumbuh Tidak Rata
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -62,7 +67,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 316fb411ce724ad49909bf032ca5a319, type: 3}
|
_image: {fileID: 21300000, guid: 316fb411ce724ad49909bf032ca5a319, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName:
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'e. Bau Mulut
|
_description: 'e. Bau Mulut
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -71,7 +77,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 99c0f7e0ea3ff284b8f2be5902657723, type: 3}
|
_image: {fileID: 21300000, guid: 99c0f7e0ea3ff284b8f2be5902657723, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName:
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'f. Gigi Sensitif
|
_description: 'f. Gigi Sensitif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -80,7 +87,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: ea90efc0647f5fb43b4a7d42a80d912d, type: 3}
|
_image: {fileID: 21300000, guid: ea90efc0647f5fb43b4a7d42a80d912d, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName:
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'g. Plak Gigi
|
_description: 'g. Plak Gigi
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -89,7 +97,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 0b10f5c153d951143a077358e3593119, type: 3}
|
_image: {fileID: 21300000, guid: 0b10f5c153d951143a077358e3593119, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName:
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'h. Karang Gigi
|
_description: 'h. Karang Gigi
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -98,7 +107,8 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 239992cc0668d1d4682da8340ac32f1a, type: 3}
|
_image: {fileID: 21300000, guid: 239992cc0668d1d4682da8340ac32f1a, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName:
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: 'i. Radang Gusi (Gingivitis)
|
_description: 'i. Radang Gusi (Gingivitis)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -107,9 +117,11 @@ MonoBehaviour:
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 9d338023b8be99746b9c2078fe74338a, type: 3}
|
_image: {fileID: 21300000, guid: 9d338023b8be99746b9c2078fe74338a, type: 3}
|
||||||
- _name: Penyakit pada Gigi & Mulut
|
- dubbingName:
|
||||||
|
_name: Penyakit pada Gigi & Mulut
|
||||||
_description: j. Infeksi Mulut (Luka atau Bengkak), Luka atau bengkak di mulut
|
_description: j. Infeksi Mulut (Luka atau Bengkak), Luka atau bengkak di mulut
|
||||||
yang membuat sakit dan tidak nyaman.
|
yang membuat sakit dan tidak nyaman.
|
||||||
_sceneName:
|
_sceneName:
|
||||||
_id:
|
_id:
|
||||||
_image: {fileID: 21300000, guid: 99f25d2a7ed6e094c999412f8c9a4498, type: 3}
|
_image: {fileID: 21300000, guid: 99f25d2a7ed6e094c999412f8c9a4498, type: 3}
|
||||||
|
dubbingNameMateri:
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cebef5474834c814eb094f4900dc001a
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0975376fdffd301449e36ebbbdc32482
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -803,6 +803,9 @@ MonoBehaviour:
|
||||||
- {fileID: 8300000, guid: 0353eeb16e4b041418cec834b15a6be7, type: 3}
|
- {fileID: 8300000, guid: 0353eeb16e4b041418cec834b15a6be7, type: 3}
|
||||||
- {fileID: 8300000, guid: 9adea056d87454b4bb661e084d67fb24, type: 3}
|
- {fileID: 8300000, guid: 9adea056d87454b4bb661e084d67fb24, type: 3}
|
||||||
- {fileID: 8300000, guid: 68730f8e765da6b43a31b9a976d4c3f1, type: 3}
|
- {fileID: 8300000, guid: 68730f8e765da6b43a31b9a976d4c3f1, type: 3}
|
||||||
|
- {fileID: 8300000, guid: cebef5474834c814eb094f4900dc001a, type: 3}
|
||||||
|
- {fileID: 8300000, guid: 8729a23f90d0cf540adc803a0ff1df0d, type: 3}
|
||||||
|
- {fileID: 8300000, guid: 0975376fdffd301449e36ebbbdc32482, type: 3}
|
||||||
--- !u!4 &1894816134
|
--- !u!4 &1894816134
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -13,21 +13,29 @@ public class MateriKesehatanGigi : Menu<MateriKesehatanGigi>
|
||||||
protected MateriSelector MateriSelector;
|
protected MateriSelector MateriSelector;
|
||||||
protected MateriSpec currentMateri;
|
protected MateriSpec currentMateri;
|
||||||
|
|
||||||
|
private int indexBgm = 0;
|
||||||
|
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
base.Awake();
|
base.Awake();
|
||||||
MateriSelector = GetComponent<MateriSelector>();
|
MateriSelector = GetComponent<MateriSelector>();
|
||||||
|
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
|
indexBgm++;
|
||||||
|
if (indexBgm > 1)
|
||||||
|
{
|
||||||
|
PlayInitDubbing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateInfo()
|
public void UpdateInfo()
|
||||||
{
|
{
|
||||||
|
|
||||||
currentMateri = MateriSelector.GetCurrentMission();
|
currentMateri = MateriSelector.GetCurrentMission();
|
||||||
|
|
||||||
if(currentMateri != null )
|
if(currentMateri != null )
|
||||||
|
|
@ -38,20 +46,52 @@ public class MateriKesehatanGigi : Menu<MateriKesehatanGigi>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PlayInitDubbing()
|
||||||
|
{
|
||||||
|
currentMateri = MateriSelector.GetCurrentMission();
|
||||||
|
|
||||||
|
if(currentMateri != null )
|
||||||
|
{
|
||||||
|
audioController.Instance.StopDubbing();
|
||||||
|
audioController.Instance.PlayDubbing(currentMateri.DubbingName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayNextDubbing()
|
||||||
|
{
|
||||||
|
MateriSpec materiDub = MateriSelector.GetNextMissionDubbing();
|
||||||
|
if (materiDub != null)
|
||||||
|
{
|
||||||
|
audioController.Instance.StopDubbing();
|
||||||
|
audioController.Instance.PlayDubbing(materiDub.DubbingName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayPreviousDubbing()
|
||||||
|
{
|
||||||
|
MateriSpec materiDub = MateriSelector.GetPreviousMissionDubbing();
|
||||||
|
if (materiDub != null)
|
||||||
|
{
|
||||||
|
audioController.Instance.StopDubbing();
|
||||||
|
audioController.Instance.PlayDubbing(materiDub.DubbingName);
|
||||||
|
}
|
||||||
|
}
|
||||||
public void OnNextPressed()
|
public void OnNextPressed()
|
||||||
{
|
{
|
||||||
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
||||||
|
|
||||||
MateriSelector.IncrementIndex();
|
MateriSelector.IncrementIndex();
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
|
PlayNextDubbing();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPreviousPressed()
|
public void OnPreviousPressed()
|
||||||
{
|
{
|
||||||
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
||||||
|
|
||||||
MateriSelector.DecrementIndex();
|
MateriSelector.DecrementIndex();
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
|
PlayPreviousDubbing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class MateriList : ScriptableObject
|
||||||
[SerializeField] private List<MateriSpec> materiSpecs = new List<MateriSpec>();
|
[SerializeField] private List<MateriSpec> materiSpecs = new List<MateriSpec>();
|
||||||
|
|
||||||
public int totalMateri => materiSpecs.Count;
|
public int totalMateri => materiSpecs.Count;
|
||||||
|
public string dubbingNameMateri;
|
||||||
public MateriSpec GetMateri(int index)
|
public MateriSpec GetMateri(int index)
|
||||||
{
|
{
|
||||||
return materiSpecs[index];
|
return materiSpecs[index];
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ public class MateriPenyakitGigi : Menu<MateriPenyakitGigi>
|
||||||
|
|
||||||
protected MateriSelector MateriSelector;
|
protected MateriSelector MateriSelector;
|
||||||
protected MateriSpec currentMateri;
|
protected MateriSpec currentMateri;
|
||||||
|
|
||||||
|
int indexBgm = 0;
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
|
|
@ -24,6 +26,11 @@ public class MateriPenyakitGigi : Menu<MateriPenyakitGigi>
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
|
indexBgm++;
|
||||||
|
if (indexBgm > 1)
|
||||||
|
{
|
||||||
|
PlayInitDubbing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateInfo()
|
public void UpdateInfo()
|
||||||
|
|
@ -41,17 +48,48 @@ public class MateriPenyakitGigi : Menu<MateriPenyakitGigi>
|
||||||
public void OnNextPressed()
|
public void OnNextPressed()
|
||||||
{
|
{
|
||||||
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
||||||
|
|
||||||
MateriSelector.IncrementIndex();
|
MateriSelector.IncrementIndex();
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
|
PlayNextDubbing();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPreviousPressed()
|
public void OnPreviousPressed()
|
||||||
{
|
{
|
||||||
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
audioController.Instance.PlaySFX("TombolUmum", 0.5f);
|
||||||
|
|
||||||
MateriSelector.DecrementIndex();
|
MateriSelector.DecrementIndex();
|
||||||
UpdateInfo();
|
UpdateInfo();
|
||||||
|
PlayPreviousDubbing();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayInitDubbing()
|
||||||
|
{
|
||||||
|
currentMateri = MateriSelector.GetCurrentMission();
|
||||||
|
|
||||||
|
if(currentMateri != null )
|
||||||
|
{
|
||||||
|
audioController.Instance.StopDubbing();
|
||||||
|
audioController.Instance.PlayDubbing(currentMateri.DubbingName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayNextDubbing()
|
||||||
|
{
|
||||||
|
MateriSpec materiDub = MateriSelector.GetNextMissionDubbing();
|
||||||
|
if (materiDub != null)
|
||||||
|
{
|
||||||
|
audioController.Instance.StopDubbing();
|
||||||
|
audioController.Instance.PlayDubbing(materiDub.DubbingName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayPreviousDubbing()
|
||||||
|
{
|
||||||
|
MateriSpec materiDub = MateriSelector.GetPreviousMissionDubbing();
|
||||||
|
if (materiDub != null)
|
||||||
|
{
|
||||||
|
audioController.Instance.StopDubbing();
|
||||||
|
audioController.Instance.PlayDubbing(materiDub.DubbingName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,4 +55,14 @@ public class MateriSelector : MonoBehaviour
|
||||||
return materiList.GetMateri(currentIndex);
|
return materiList.GetMateri(currentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MateriSpec GetNextMissionDubbing()
|
||||||
|
{
|
||||||
|
return materiList.GetMateri(currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MateriSpec GetPreviousMissionDubbing()
|
||||||
|
{
|
||||||
|
return materiList.GetMateri(currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ using UnityEngine;
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class MateriSpec
|
public class MateriSpec
|
||||||
{
|
{
|
||||||
|
[SerializeField] protected string dubbingName;
|
||||||
[SerializeField] protected string _name;
|
[SerializeField] protected string _name;
|
||||||
[TextArea]
|
[TextArea]
|
||||||
[SerializeField] protected string _description;
|
[SerializeField] protected string _description;
|
||||||
|
|
@ -12,6 +13,7 @@ public class MateriSpec
|
||||||
[SerializeField] protected string _id;
|
[SerializeField] protected string _id;
|
||||||
[SerializeField] protected Sprite _image;
|
[SerializeField] protected Sprite _image;
|
||||||
|
|
||||||
|
public string DubbingName => dubbingName;
|
||||||
public string Name => _name;
|
public string Name => _name;
|
||||||
public string Description => _description;
|
public string Description => _description;
|
||||||
public string SceneName => _sceneName;
|
public string SceneName => _sceneName;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue