fix database mismatch with provided data
This commit is contained in:
parent
855a335a9e
commit
11563a9729
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b82b30ab92368d440a7ba8175f93e993
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 42f0952ae072ce148a82bcb0a536f09b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7a8ca6739d3d8f14a91912b88b1c4223
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -439,7 +439,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 595efc24dd85c41689f6e34d27e57364, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: b9c3df709cdaf4e1f93e80ea5201d9c7, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
|
@ -1316,8 +1316,8 @@ MonoBehaviour:
|
|||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278190080
|
||||
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
|
@ -604,7 +604,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Normal
|
||||
m_text: Medium
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 9fa5016cb7e534c0aa0c0adb2ecf9124, type: 2}
|
||||
m_sharedMaterial: {fileID: 6098576539282327867, guid: 9fa5016cb7e534c0aa0c0adb2ecf9124, type: 2}
|
||||
|
@ -4246,7 +4246,6 @@ MonoBehaviour:
|
|||
- {fileID: 6192693295909777234}
|
||||
- {fileID: 1286686813965654718}
|
||||
indexUnlock: 2
|
||||
dataManager: {fileID: 0}
|
||||
completeSprite: {fileID: 21300000, guid: 16b4fc3c337f7479594d3803b90e548b, type: 3}
|
||||
lockedSprite: {fileID: 21300000, guid: f5997d4636ee94b33bcf0aaf09adbd23, type: 3}
|
||||
currentSprite: {fileID: 21300000, guid: b9c3df709cdaf4e1f93e80ea5201d9c7, type: 3}
|
|
@ -2295,22 +2295,10 @@ MonoBehaviour:
|
|||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 6107858163566314826}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 1
|
||||
m_CallState: 2
|
||||
- m_Target: {fileID: 6686331239248699639}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
- m_Target: {fileID: 2300231812597875134}
|
||||
m_TargetAssemblyTypeName: AuntMenu, Assembly-CSharp
|
||||
m_MethodName: NextToDataDiri
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
|
@ -9972,6 +9960,8 @@ MonoBehaviour:
|
|||
ageFieldRegister: {fileID: 3424241449911130176}
|
||||
paswordFieldRegister: {fileID: 4219600053296574459}
|
||||
EmailFieldRegister: {fileID: 6470846796140016568}
|
||||
RegisterObj: {fileID: 6686331239248699639}
|
||||
DataDiriObject: {fileID: 6107858163566314826}
|
||||
usernameFieldLogin: {fileID: 6946444164070354282}
|
||||
paswordFieldLogin: {fileID: 5236717215940508451}
|
||||
--- !u!1 &8756343116425726590
|
|
@ -17,6 +17,9 @@ public class AuntMenu : Menu<AuntMenu>
|
|||
private string EmailRegister;
|
||||
private string paswordRegister;
|
||||
|
||||
[SerializeField] private GameObject RegisterObj;
|
||||
[SerializeField] private GameObject DataDiriObject;
|
||||
|
||||
[Header("Login")]
|
||||
[SerializeField] private TMP_InputField usernameFieldLogin;
|
||||
[SerializeField] private TMP_InputField paswordFieldLogin;
|
||||
|
@ -36,6 +39,30 @@ public class AuntMenu : Menu<AuntMenu>
|
|||
{
|
||||
AuthenticationService.Instance.SignedIn -= NextToMenu;
|
||||
}
|
||||
|
||||
|
||||
private bool IsRegisterFieldInvalid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(usernameFieldRegister.text))
|
||||
{
|
||||
Debug.LogWarning("Username field is empty!");
|
||||
return true;
|
||||
}
|
||||
if (string.IsNullOrEmpty(paswordFieldRegister.text))
|
||||
{
|
||||
Debug.LogWarning("Password field is empty!");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(EmailFieldRegister.text))
|
||||
{
|
||||
Debug.LogWarning("Email field is empty!");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public async void Login()
|
||||
{
|
||||
|
@ -61,9 +88,17 @@ public class AuntMenu : Menu<AuntMenu>
|
|||
Debug.Log("MainMenu Open");
|
||||
}
|
||||
|
||||
public void NextToDataDiri()
|
||||
{
|
||||
if (IsRegisterFieldInvalid()) return;
|
||||
DataDiriObject.SetActive(true);
|
||||
RegisterObj.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
public async void Register()
|
||||
{
|
||||
if (IsRegisterFieldInvalid()) return;
|
||||
usernameRegister = usernameFieldRegister.text;
|
||||
paswordRegister = paswordFieldRegister.text;
|
||||
EmailRegister = EmailFieldRegister.text;
|
||||
|
@ -79,6 +114,7 @@ public class AuntMenu : Menu<AuntMenu>
|
|||
SaveData dataToSave = new SaveData();
|
||||
dataToSave.playerName = nameFieldRegister.text;
|
||||
dataToSave.agePlayer = AgeRegister;
|
||||
|
||||
await Cloudsave.SaveData(dataToSave, "DataPlayer");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ public class SaveData
|
|||
public float kesehatanGigiStatistik;
|
||||
public float PenyakitGigiStatistik;
|
||||
|
||||
public bool[] isMateriKesehatanGigiComplete = new bool[4];
|
||||
public bool[] isMateriPenyakitGigi1Complete= new bool[3];
|
||||
public bool[] isQuisKesehatanGigiComplete = new bool[5];
|
||||
public bool[] isQuisPenyakitGigiComplete= new bool[4];
|
||||
|
||||
public SaveData()
|
||||
{
|
||||
|
@ -26,14 +26,14 @@ public class SaveData
|
|||
kesehatanGigiStatistik = 0;
|
||||
PenyakitGigiStatistik = 0;
|
||||
|
||||
for (int i = 0; i < isMateriKesehatanGigiComplete.Length; i++)
|
||||
for (int i = 0; i < isQuisKesehatanGigiComplete.Length; i++)
|
||||
{
|
||||
isMateriKesehatanGigiComplete[i] = false;
|
||||
isQuisKesehatanGigiComplete[i] = false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < isMateriPenyakitGigi1Complete.Length; i++)
|
||||
for (int i = 0; i < isQuisPenyakitGigiComplete.Length; i++)
|
||||
{
|
||||
isMateriPenyakitGigi1Complete[i] = false;
|
||||
isQuisPenyakitGigiComplete[i] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ public class Enemy : MonoBehaviour
|
|||
|
||||
if (health <= 0)
|
||||
{
|
||||
health = 0;
|
||||
await ExecuteBosDeath();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,14 +32,6 @@ public abstract class Menu<T> : Menu where T : Menu<T>
|
|||
}
|
||||
}
|
||||
|
||||
private void OnApplicationPause(bool pause)
|
||||
{
|
||||
if (pause)
|
||||
{
|
||||
HandleAppExit();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
HandleAppExit();
|
||||
|
|
|
@ -113,6 +113,7 @@ public class QuizPopUp : Menu<QuizPopUp>
|
|||
|
||||
public void UpdateTimer()
|
||||
{
|
||||
|
||||
timerValue -= Time.deltaTime;
|
||||
timerValue = Mathf.Max(timerValue, 0);
|
||||
|
||||
|
@ -235,34 +236,34 @@ public class QuizPopUp : Menu<QuizPopUp>
|
|||
|
||||
if (currentQuestion.isMateriKesehatanGigi)
|
||||
{
|
||||
if (checkData >= 0 && checkData < saveData.isMateriKesehatanGigiComplete.Length)
|
||||
if (checkData >= 0 && checkData < saveData.isQuisKesehatanGigiComplete.Length)
|
||||
{
|
||||
if (!saveData.isMateriKesehatanGigiComplete[checkData])
|
||||
if (!saveData.isQuisKesehatanGigiComplete[checkData])
|
||||
{
|
||||
saveData.isMateriKesehatanGigiComplete[checkData] = true;
|
||||
saveData.isQuisKesehatanGigiComplete[checkData] = true;
|
||||
saveData.kesehatanGigiStatistik = Mathf.Min(saveData.kesehatanGigiStatistik + 25f, 100f);
|
||||
await Cloudsave.SaveData(saveData, "DataPlayer");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Index {checkData} out of bounds for isMateriKesehatanGigiComplete (length: {saveData.isMateriKesehatanGigiComplete.Length})");
|
||||
Debug.LogWarning($"Index {checkData} out of bounds for isMateriKesehatanGigiComplete (length: {saveData.isQuisKesehatanGigiComplete.Length})");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (checkData >= 0 && checkData < saveData.isMateriPenyakitGigi1Complete.Length)
|
||||
if (checkData >= 0 && checkData < saveData.isQuisPenyakitGigiComplete.Length)
|
||||
{
|
||||
if (!saveData.isMateriPenyakitGigi1Complete[checkData])
|
||||
if (!saveData.isQuisPenyakitGigiComplete[checkData])
|
||||
{
|
||||
saveData.isMateriPenyakitGigi1Complete[checkData] = true;
|
||||
saveData.isQuisPenyakitGigiComplete[checkData] = true;
|
||||
saveData.PenyakitGigiStatistik = Mathf.Min(Mathf.Ceil(saveData.PenyakitGigiStatistik + 33.33f), 100f);
|
||||
await Cloudsave.SaveData(saveData, "DataPlayer");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Index {checkData} out of bounds for isMateriPenyakitGigi1Complete (length: {saveData.isMateriPenyakitGigi1Complete.Length})");
|
||||
Debug.LogWarning($"Index {checkData} out of bounds for isMateriPenyakitGigi1Complete (length: {saveData.isQuisPenyakitGigiComplete.Length})");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
|
@ -0,0 +1,135 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 298e5741d668c174e8d5923602042a5e
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -277,7 +277,7 @@ PlayerSettings:
|
|||
- m_BuildTarget:
|
||||
m_Icons:
|
||||
- serializedVersion: 2
|
||||
m_Icon: {fileID: 2800000, guid: 14f19c212af9b334891d9cbe3494aed9, type: 3}
|
||||
m_Icon: {fileID: 2800000, guid: 298e5741d668c174e8d5923602042a5e, type: 3}
|
||||
m_Width: 128
|
||||
m_Height: 128
|
||||
m_Kind: 0
|
||||
|
@ -697,6 +697,7 @@ PlayerSettings:
|
|||
platformArchitecture: {}
|
||||
scriptingBackend:
|
||||
Android: 1
|
||||
Standalone: 1
|
||||
il2cppCompilerConfiguration: {}
|
||||
managedStrippingLevel:
|
||||
EmbeddedLinux: 1
|
||||
|
|
Loading…
Reference in New Issue