SDK working now

hazim-dev
Ali Sharoz 2 weeks ago
parent 539aef3d33
commit fe0f97bf6a

@ -129,6 +129,7 @@ namespace D2D.Databases
Debug.Log("PassedLevels: " + PassedLevels.Value);
CompletedLevelsPerSession.Value++;
PassedLevels.Value++;
PlayFabManager.Instance.playFabLeaderboards.UpdateLevelsCompleted(PassedLevels.Value);
if (AchievementManager.instance != null)
{
AchievementManager.instance.IncrementAchievementsProgress(PassedLevels.Value);

@ -29,7 +29,8 @@ public class AudioSourceController : MonoBehaviour
// Apply the saved state
Set_Value(lastSavedVolume);
ApplyAudioState(lastSavedMusicState);
if (OnButton != null)
ApplyAudioState(lastSavedMusicState);
}
public void audioSourceGetter()

@ -10,8 +10,9 @@ using System.Threading.Tasks;
public class GoogleSignInManager : MonoBehaviour
{
private GoogleSignInConfiguration configuration;
public Bootstrapper bootstrapper; // Assign in Inspector
public Bootstrapper bootstrapper;
public Button googleSignInButton;
public Button guestLoginButton;
void Awake()
{
@ -28,23 +29,86 @@ public class GoogleSignInManager : MonoBehaviour
void Start()
{
//#if UNITY_EDITOR
// Debug.Log("Running in Editor, logging in with Custom ID...");
// var customId = SystemInfo.deviceUniqueIdentifier; // Or use "EditorTestUser" + Random.Range(0, 9999)
// var request = new LoginWithCustomIDRequest
// {
// TitleId = "1879F5",
// CustomId = customId,
// CreateAccount = true
// };
// PlayFabClientAPI.LoginWithCustomID(request, result =>
// {
// Debug.Log("✅ Editor Custom ID Login Success: " + result.PlayFabId);
// SafePlayerPrefs.SetString("PlayFabID", result.PlayFabId);
// PlayerPrefs.Save();
// LoadPlayerPrefsFromPlayFab(() =>
// {
// googleSignInButton.gameObject.SetActive(false);
// guestLoginButton.gameObject.SetActive(false);
// bootstrapper.StartGame();
// });
// }, error =>
// {
// Debug.LogError("❌ Editor Custom ID Login Failed: " + error.GenerateErrorReport());
// });
// return;
//#endif
googleSignInButton.onClick.RemoveAllListeners();
googleSignInButton.onClick.AddListener(SignInWithGoogle);
guestLoginButton.onClick.RemoveAllListeners();
guestLoginButton.onClick.AddListener(GuestLogin);
if (PlayerPrefs.HasKey("PlayFabID"))
{
Debug.Log("User already signed in, attempting silent login...");
Debug.Log("User previously signed in with Google. Attempting silent login...");
SignInSilently();
}
else if (PlayerPrefs.HasKey("GuestMode"))
{
Debug.Log("Guest mode previously selected. Starting game in guest mode...");
googleSignInButton.gameObject.SetActive(false);
guestLoginButton.gameObject.SetActive(false);
bootstrapper.StartGame();
}
else
{
Debug.Log("No saved PlayFab ID, waiting for user sign-in.");
Debug.Log("No login info found. Showing login options.");
googleSignInButton.gameObject.SetActive(true);
googleSignInButton.onClick.RemoveAllListeners();
googleSignInButton.onClick.AddListener(SignInWithGoogle);
guestLoginButton.gameObject.SetActive(true);
}
}
public void GuestLogin()
{
Debug.Log("Starting game in Guest Mode...");
PlayerPrefs.SetInt("GuestMode", 1);
PlayerPrefs.Save();
googleSignInButton.gameObject.SetActive(false);
guestLoginButton.gameObject.SetActive(false);
bootstrapper.StartGame();
}
public void SignInWithGoogle()
{
PlayerPrefs.DeleteKey("GuestMode");
PlayerPrefs.DeleteAll();
PlayerPrefs.Save();
googleSignInButton.interactable = false;
guestLoginButton.interactable = false;
GoogleSignIn.DefaultInstance.SignIn().ContinueWith(OnGoogleSignIn);
}
@ -54,19 +118,18 @@ public class GoogleSignInManager : MonoBehaviour
{
Debug.LogError("Google Sign-In failed: " + task.Exception);
// ✅ Show the sign-in button again
googleSignInButton.gameObject.SetActive(true);
googleSignInButton.interactable = true;
googleSignInButton.onClick.RemoveAllListeners();
googleSignInButton.onClick.AddListener(SignInWithGoogle);
guestLoginButton.gameObject.SetActive(true);
guestLoginButton.interactable = true;
return;
}
GoogleSignInUser user = task.Result;
string authCode = user.AuthCode;
SafePlayerPrefs.SetString("GoogleAuthCode", authCode);
//PlayerPrefsKeys.RegisterKey("GoogleAuthCode");
//PlayerPrefs.Save();
PlayerPrefs.Save();
LoginToPlayFab(authCode);
}
@ -79,25 +142,24 @@ public class GoogleSignInManager : MonoBehaviour
{
if (task.IsFaulted || task.IsCanceled)
{
Debug.LogWarning("Silent Sign-In failed, falling back to interactive sign-in.");
Debug.LogWarning("Silent Sign-In failed. Showing login buttons.");
googleSignInButton.gameObject.SetActive(true);
googleSignInButton.interactable = true;
googleSignInButton.onClick.RemoveAllListeners();
googleSignInButton.onClick.AddListener(SignInWithGoogle);
guestLoginButton.gameObject.SetActive(true);
guestLoginButton.interactable = true;
return;
}
GoogleSignInUser user = task.Result;
string authCode = user.AuthCode;
// Store it if needed for debugging — not for reuse
SafePlayerPrefs.SetString("GoogleAuthCode", authCode);
PlayerPrefs.Save();
LoginToPlayFab(authCode);
});
}
private void LoginToPlayFab(string authCode)
{
PlayFabSettings.staticSettings.TitleId = "1879F5";
@ -114,15 +176,14 @@ public class GoogleSignInManager : MonoBehaviour
private void OnPlayFabLoginSuccess(LoginResult result)
{
Debug.Log("✅ PlayFab Login Success! PlayFab ID: " + result.PlayFabId);
SafePlayerPrefs.SetString("PlayFabID", result.PlayFabId);
//PlayerPrefsKeys.RegisterKey("PlayFabID");
//PlayerPrefs.Save();
PlayerPrefs.Save();
LoadPlayerPrefsFromPlayFab(() =>
{
googleSignInButton.gameObject.SetActive(false);
bootstrapper.StartGame(); // Start the game after loading
guestLoginButton.gameObject.SetActive(false);
bootstrapper.StartGame();
});
}
@ -130,11 +191,11 @@ public class GoogleSignInManager : MonoBehaviour
{
Debug.LogError("❌ PlayFab Login Failed: " + error.GenerateErrorReport());
// ✅ Re-enable button so player can retry
googleSignInButton.gameObject.SetActive(true);
googleSignInButton.interactable = true;
googleSignInButton.onClick.RemoveAllListeners();
googleSignInButton.onClick.AddListener(SignInWithGoogle);
guestLoginButton.gameObject.SetActive(true);
guestLoginButton.interactable = true;
}
private void LoadPlayerPrefsFromPlayFab(Action onComplete)
@ -148,39 +209,18 @@ public class GoogleSignInManager : MonoBehaviour
string key = entry.Key;
string rawValue = entry.Value.Value;
if (rawValue.StartsWith("int:"))
{
if (int.TryParse(rawValue.Substring(4), out int intVal))
{
SafePlayerPrefs.SetInt(key, intVal);
}
}
else if (rawValue.StartsWith("float:"))
{
if (float.TryParse(rawValue.Substring(6), out float floatVal))
{
SafePlayerPrefs.SetFloat(key, floatVal);
}
}
if (rawValue.StartsWith("int:") && int.TryParse(rawValue.Substring(4), out int i))
SafePlayerPrefs.SetInt(key, i);
else if (rawValue.StartsWith("float:") && float.TryParse(rawValue.Substring(6), out float f))
SafePlayerPrefs.SetFloat(key, f);
else if (rawValue.StartsWith("string:"))
{
SafePlayerPrefs.SetString(key, rawValue.Substring(7));
}
else
{
// Backward compatibility: if value has no type prefix, store as string
SafePlayerPrefs.SetString(key, rawValue);
}
PlayerPrefsKeys.RegisterKey(key);
}
PlayerPrefs.Save();
Debug.Log("✅ Loaded PlayerPrefs from PlayFab.");
}
else
{
Debug.Log(" No saved PlayerPrefs found in PlayFab.");
}
onComplete?.Invoke();
@ -194,8 +234,9 @@ public class GoogleSignInManager : MonoBehaviour
private void SyncPlayerPrefsToPlayFabOnQuit()
{
Dictionary<string, string> allPrefs = new Dictionary<string, string>();
if (PlayerPrefs.HasKey("GuestMode")) return;
Dictionary<string, string> allPrefs = new Dictionary<string, string>();
foreach (var key in PlayerPrefsKeys.GetAllKeys())
{
allPrefs[key] = PlayerPrefs.GetString(key);
@ -208,16 +249,242 @@ public class GoogleSignInManager : MonoBehaviour
PlayFabClientAPI.UpdateUserData(request,
result => Debug.Log("✅ Synced PlayerPrefs to PlayFab on quit."),
error => Debug.LogError("❌ Failed to sync PlayerPrefs on quit: " + error.GenerateErrorReport()));
error => Debug.LogError("❌ Failed to sync PlayerPrefs: " + error.GenerateErrorReport()));
}
public void SignOut()
{
PlayerPrefs.DeleteKey("PlayFabID");
PlayerPrefs.DeleteKey("GoogleAuthCode");
PlayerPrefs.DeleteKey("PlayFabID");
PlayerPrefs.DeleteKey("GuestMode");
PlayerPrefs.Save();
GoogleSignIn.DefaultInstance.SignOut();
Debug.Log("User signed out.");
}
}
//using UnityEngine;
//using UnityEngine.UI;
//using Google;
//using PlayFab;
//using PlayFab.ClientModels;
//using System;
//using System.Collections.Generic;
//using System.Threading.Tasks;
//public class GoogleSignInManager : MonoBehaviour
//{
// private GoogleSignInConfiguration configuration;
// public Bootstrapper bootstrapper; // Assign in Inspector
// public Button googleSignInButton;
// void Awake()
// {
// configuration = new GoogleSignInConfiguration
// {
// WebClientId = "723833850517-865419enf8t0j1itln3cgmd1b67shsue.apps.googleusercontent.com",
// RequestEmail = true,
// RequestAuthCode = true
// };
// GoogleSignIn.Configuration = configuration;
// Application.quitting += SyncPlayerPrefsToPlayFabOnQuit;
// }
// void Start()
// {
// if (PlayerPrefs.HasKey("PlayFabID"))
// {
// Debug.Log("User already signed in, attempting silent login...");
// SignInSilently();
// }
// else
// {
// Debug.Log("No saved PlayFab ID, waiting for user sign-in.");
// googleSignInButton.gameObject.SetActive(true);
// googleSignInButton.onClick.RemoveAllListeners();
// googleSignInButton.onClick.AddListener(SignInWithGoogle);
// }
// }
// public void SignInWithGoogle()
// {
// googleSignInButton.interactable = false;
// GoogleSignIn.DefaultInstance.SignIn().ContinueWith(OnGoogleSignIn);
// }
// private void OnGoogleSignIn(Task<GoogleSignInUser> task)
// {
// if (task.IsFaulted || task.IsCanceled)
// {
// Debug.LogError("Google Sign-In failed: " + task.Exception);
// // ✅ Show the sign-in button again
// googleSignInButton.gameObject.SetActive(true);
// googleSignInButton.interactable = true;
// googleSignInButton.onClick.RemoveAllListeners();
// googleSignInButton.onClick.AddListener(SignInWithGoogle);
// return;
// }
// GoogleSignInUser user = task.Result;
// string authCode = user.AuthCode;
// SafePlayerPrefs.SetString("GoogleAuthCode", authCode);
// //PlayerPrefsKeys.RegisterKey("GoogleAuthCode");
// //PlayerPrefs.Save();
// LoginToPlayFab(authCode);
// }
// private void SignInSilently()
// {
// Debug.Log("Attempting Google Silent Sign-In...");
// GoogleSignIn.DefaultInstance.SignInSilently().ContinueWith(task =>
// {
// if (task.IsFaulted || task.IsCanceled)
// {
// Debug.LogWarning("Silent Sign-In failed, falling back to interactive sign-in.");
// googleSignInButton.gameObject.SetActive(true);
// googleSignInButton.interactable = true;
// googleSignInButton.onClick.RemoveAllListeners();
// googleSignInButton.onClick.AddListener(SignInWithGoogle);
// return;
// }
// GoogleSignInUser user = task.Result;
// string authCode = user.AuthCode;
// // Store it if needed for debugging — not for reuse
// SafePlayerPrefs.SetString("GoogleAuthCode", authCode);
// LoginToPlayFab(authCode);
// });
// }
// private void LoginToPlayFab(string authCode)
// {
// PlayFabSettings.staticSettings.TitleId = "1879F5";
// var request = new LoginWithGoogleAccountRequest
// {
// TitleId = "1879F5",
// ServerAuthCode = authCode,
// CreateAccount = true
// };
// PlayFabClientAPI.LoginWithGoogleAccount(request, OnPlayFabLoginSuccess, OnPlayFabLoginFailure);
// }
// private void OnPlayFabLoginSuccess(LoginResult result)
// {
// Debug.Log("✅ PlayFab Login Success! PlayFab ID: " + result.PlayFabId);
// SafePlayerPrefs.SetString("PlayFabID", result.PlayFabId);
// //PlayerPrefsKeys.RegisterKey("PlayFabID");
// //PlayerPrefs.Save();
// LoadPlayerPrefsFromPlayFab(() =>
// {
// googleSignInButton.gameObject.SetActive(false);
// bootstrapper.StartGame(); // Start the game after loading
// });
// }
// private void OnPlayFabLoginFailure(PlayFabError error)
// {
// Debug.LogError("❌ PlayFab Login Failed: " + error.GenerateErrorReport());
// // ✅ Re-enable button so player can retry
// googleSignInButton.gameObject.SetActive(true);
// googleSignInButton.interactable = true;
// googleSignInButton.onClick.RemoveAllListeners();
// googleSignInButton.onClick.AddListener(SignInWithGoogle);
// }
// private void LoadPlayerPrefsFromPlayFab(Action onComplete)
// {
// PlayFabClientAPI.GetUserData(new GetUserDataRequest(), result =>
// {
// if (result.Data != null)
// {
// foreach (var entry in result.Data)
// {
// string key = entry.Key;
// string rawValue = entry.Value.Value;
// if (rawValue.StartsWith("int:"))
// {
// if (int.TryParse(rawValue.Substring(4), out int intVal))
// {
// SafePlayerPrefs.SetInt(key, intVal);
// }
// }
// else if (rawValue.StartsWith("float:"))
// {
// if (float.TryParse(rawValue.Substring(6), out float floatVal))
// {
// SafePlayerPrefs.SetFloat(key, floatVal);
// }
// }
// else if (rawValue.StartsWith("string:"))
// {
// SafePlayerPrefs.SetString(key, rawValue.Substring(7));
// }
// else
// {
// // Backward compatibility: if value has no type prefix, store as string
// SafePlayerPrefs.SetString(key, rawValue);
// }
// PlayerPrefsKeys.RegisterKey(key);
// }
// PlayerPrefs.Save();
// Debug.Log("✅ Loaded PlayerPrefs from PlayFab.");
// }
// else
// {
// Debug.Log(" No saved PlayerPrefs found in PlayFab.");
// }
// onComplete?.Invoke();
// },
// error =>
// {
// Debug.LogError("❌ Failed to load PlayerPrefs from PlayFab: " + error.GenerateErrorReport());
// onComplete?.Invoke();
// });
// }
// private void SyncPlayerPrefsToPlayFabOnQuit()
// {
// Dictionary<string, string> allPrefs = new Dictionary<string, string>();
// foreach (var key in PlayerPrefsKeys.GetAllKeys())
// {
// allPrefs[key] = PlayerPrefs.GetString(key);
// }
// var request = new UpdateUserDataRequest
// {
// Data = allPrefs
// };
// PlayFabClientAPI.UpdateUserData(request,
// result => Debug.Log("✅ Synced PlayerPrefs to PlayFab on quit."),
// error => Debug.LogError("❌ Failed to sync PlayerPrefs on quit: " + error.GenerateErrorReport()));
// }
// public void SignOut()
// {
// PlayerPrefs.DeleteKey("PlayFabID");
// PlayerPrefs.DeleteKey("GoogleAuthCode");
// PlayerPrefs.Save();
// GoogleSignIn.DefaultInstance.SignOut();
// Debug.Log("User signed out.");
// }
//}

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: df8ccdbfa53820647be6f67fba435252
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,4 +1,4 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using PlayFab;
@ -12,20 +12,17 @@ public class LeaderboardUIScreen : MonoBehaviour
[SerializeField] private Transform content;
[SerializeField] private List<LBPedestalItem> _lbPedestalItems;
public void Init()
{
Debug.Log("Leaderboard Initialized");
PlayFabManager.Instance.playFabLeaderboards.GetLeaderboard(OnLeaderboardFetchSuccess, OnLeaderboardFetchFailure);
}
public void OnClose()
{
// GameObject[] temp = content.transform.GetComponentsInChildren<GameObject>();
// for (int i = 0; i < temp.Length; i++)
// {
// Destroy(temp[i]);
// }
// Cleanup leaderboard UI elements
}
private void OnLeaderboardFetchSuccess(List<PlayerLeaderboardEntry> leaderboard)
{
foreach (Transform child in content.transform)
@ -33,6 +30,7 @@ public class LeaderboardUIScreen : MonoBehaviour
Destroy(child.gameObject);
}
PopulateLeaderboard(leaderboard);
Debug.Log("Leaderboard fetch success");
}
private void PopulateLeaderboard(List<PlayerLeaderboardEntry> leaderboard)
@ -46,46 +44,48 @@ public class LeaderboardUIScreen : MonoBehaviour
}
}
content.GetComponent<RectTransform>().DOAnchorPosX(0f,1f).SetEase(Ease.OutElastic);
content.GetComponent<RectTransform>().DOAnchorPosX(0f, 1f).SetEase(Ease.OutElastic);
}
private void PopulateLbItem(PlayerLeaderboardEntry lbEntry)
{
bool isSelf = lbEntry.Profile.PlayerId == PlayFabManager.Instance.playFabUserDataManager.myProfile.PlayerId;
bool isSelf = lbEntry.Profile != null &&
PlayFabManager.Instance.playFabUserDataManager?.myProfile != null &&
lbEntry.Profile.PlayerId == PlayFabManager.Instance.playFabUserDataManager.myProfile.PlayerId;
LBEntryItem lbItem = Instantiate(isSelf ? lbItemSelfPrefab : lbItemPrefab, content).GetComponent<LBEntryItem>();
lbItem.nameText.text = lbEntry.DisplayName;
lbItem.nameText.text = lbEntry.DisplayName ?? lbEntry.PlayFabId;
lbItem.rankText.text = (lbEntry.Position + 1).ToString();
lbItem.scoreText.text = lbEntry.StatValue.ToString();
PlayFabManager.Instance.playFabUserDataManager.GetPlayerAvatarImage(lbEntry.PlayFabId, (sprite) =>
{
lbItem.profilePic.sprite = sprite;
},
(s) =>
{
Debug.Log("Couldnt get pic");
});
{
lbItem.profilePic.sprite = sprite;
},
(s) =>
{
Debug.Log("Couldn<EFBFBD>t get pic");
});
}
private void PopulatePedestalItem(PlayerLeaderboardEntry lbEntry)
{
LBPedestalItem pedestalItem = _lbPedestalItems[lbEntry.Position];
pedestalItem.nameText.text = lbEntry.DisplayName??lbEntry.PlayFabId;
pedestalItem.nameText.text = lbEntry.DisplayName ?? lbEntry.PlayFabId;
pedestalItem.scoreText.text = lbEntry.StatValue.ToString();
PlayFabManager.Instance.playFabUserDataManager.GetPlayerAvatarImage(lbEntry.PlayFabId, (sprite) =>
{
pedestalItem.profilePic.sprite = sprite;
},
(s) =>
{
Debug.Log("Could'nt get pic");
});
{
pedestalItem.profilePic.sprite = sprite;
},
(s) =>
{
Debug.Log("Couldn<EFBFBD>t get pic");
});
}
private void OnLeaderboardFetchFailure(PlayFabError obj)
{
Debug.Log("Couldn't Load Leaderboards");
throw new System.NotImplementedException();
Debug.LogError("Couldn't Load Leaderboards: " + obj.GenerateErrorReport());
}
}

@ -1,129 +0,0 @@
using UnityEngine;
using PlayFab;
using PlayFab.ClientModels;
using System.Collections.Generic;
public class PlayerPrefsSyncManager : MonoBehaviour
{
private static PlayerPrefsSyncManager instance;
private void OnApplicationQuit()
{
SyncPlayerPrefsToPlayFabOnQuit();
}
private void OnApplicationPause()
{
SyncPlayerPrefsToPlayFabOnQuit();
}
private void OnApplicationFocus(bool focus)
{
if (!focus)
SyncPlayerPrefsToPlayFabOnQuit();
}
void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(this.gameObject);
Application.quitting += SyncPlayerPrefsToPlayFabOnQuit;
}
else
{
Destroy(gameObject);
}
}
private const int MaxKeysPerRequest = 10;
public void SyncPlayerPrefsToPlayFabOnQuit()
{
var keys = PlayerPrefsKeys.GetAllKeys();
if (keys.Count == 0)
{
Debug.Log("No PlayerPrefs keys registered, skipping sync.");
return;
}
Dictionary<string, string> allPrefs = new Dictionary<string, string>();
foreach (var key in keys)
{
string strVal = PlayerPrefs.GetString(key, "__MISSING__");
if (strVal != "__MISSING__")
{
allPrefs[key] = "string:" + strVal;
continue;
}
int intVal = PlayerPrefs.GetInt(key, int.MinValue + 1);
if (intVal != int.MinValue + 1)
{
allPrefs[key] = "int:" + intVal;
continue;
}
float floatVal = PlayerPrefs.GetFloat(key, float.MinValue + 1);
if (floatVal != float.MinValue + 1)
{
allPrefs[key] = "float:" + floatVal.ToString("R");
}
}
foreach (var pair in allPrefs)
{
Debug.Log($"[Sync] {pair.Key} = {pair.Value}");
}
// Split into batches of 10
var batches = new List<Dictionary<string, string>>();
var currentBatch = new Dictionary<string, string>();
foreach (var pair in allPrefs)
{
currentBatch[pair.Key] = pair.Value;
if (currentBatch.Count == MaxKeysPerRequest)
{
batches.Add(currentBatch);
currentBatch = new Dictionary<string, string>();
}
}
if (currentBatch.Count > 0)
{
batches.Add(currentBatch);
}
UploadPlayerPrefsBatches(batches, 0);
}
private void UploadPlayerPrefsBatches(List<Dictionary<string, string>> batches, int index)
{
if (index >= batches.Count)
{
Debug.Log("✅ All PlayerPrefs batches synced to PlayFab.");
return;
}
var request = new UpdateUserDataRequest
{
Data = batches[index],
Permission = UserDataPermission.Public
};
PlayFabClientAPI.UpdateUserData(request,
result =>
{
Debug.Log($"✅ Synced batch {index + 1}/{batches.Count}");
UploadPlayerPrefsBatches(batches, index + 1);
},
error =>
{
Debug.LogError($"❌ Failed to sync batch {index + 1}/{batches.Count}: {error.GenerateErrorReport()}");
});
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 505af05eda8a6824684d079a3bd27291
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -65,12 +65,15 @@ public class Profile : MonoBehaviour
public void LevelFillerSetter()
{
float passedLevels = _db.PassedLevels.Value;
LevelFillerImg.fillAmount = passedLevels/ 20f;
LevelFillerText.text = passedLevels.ToString()+"/20";
LevelFillerImg.fillAmount = passedLevels / 20f;
LevelFillerText.text = passedLevels.ToString() + "/20";
}
public void OnDisplayNameEntered()
{
PlayFabManager.Instance.playFabLeaderboards.SetDisplayName(nameInputField.text);
if (PlayFabClientAPI.IsClientLoggedIn())
{
PlayFabManager.Instance.playFabLeaderboards.SetDisplayName(nameInputField.text);
}
SafePlayerPrefs.SetInt(GameConstants.NameEnteredCheckKey, 1);
SafePlayerPrefs.SetString(GameConstants.DisplayNameKey, nameInputField.text);
HeaderProfileName.text = nameInputField.text;
@ -100,8 +103,8 @@ public class Profile : MonoBehaviour
},
Permission = UserDataPermission.Public
};
PlayFabClientAPI.UpdateUserData(request, OnDataUpdateSuccess, OnDataUpdateFailure);
if (PlayFabClientAPI.IsClientLoggedIn())
PlayFabClientAPI.UpdateUserData(request, OnDataUpdateSuccess, OnDataUpdateFailure);
}
private void OnDataUpdateSuccess(UpdateUserDataResult result)
{
@ -112,6 +115,4 @@ public class Profile : MonoBehaviour
{
Debug.LogError("Failed to update Avatar ID: " + error.GenerateErrorReport());
}
}

@ -219,287 +219,6 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 2482728081838297372, guid: 1655ad8223f244d34a1dc63ee78eac3f, type: 3}
m_PrefabInstance: {fileID: 1652842655}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &168582916
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 109254, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 132536, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_Name
value: IngameDebugConsole
objectReference: {fileID: 0}
- target: {fileID: 11490438, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_BlockingMask.m_Bits
value: 1048575
objectReference: {fileID: 0}
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22428984, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22455554, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22457152, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22468896, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22488670, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 22495692, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224619367409363176, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224856348943071238, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
--- !u!1 &183355940
GameObject:
m_ObjectHideFlags: 0
@ -727,7 +446,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &561952462
RectTransform:
m_ObjectHideFlags: 0
@ -1080,9 +799,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a853c83bcccfa14468a366e0290483a3, type: 3}
m_Name:
m_EditorClassIdentifier:
iAdUnit: ca-app-pub-3940256099942544/1033173712
rAdUnit: ca-app-pub-3940256099942544/5224354917
isRewardedAdAvailable: 0
--- !u!4 &747682103
Transform:
m_ObjectHideFlags: 0
@ -1098,6 +814,140 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &767955479
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 767955480}
- component: {fileID: 767955482}
- component: {fileID: 767955481}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &767955480
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 767955479}
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: 1366011438}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &767955481
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 767955479}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Guest Login
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: a1e51e3ae923eae4b83ad89f69cec9c7, type: 2}
m_sharedMaterial: {fileID: -3550507464897157485, guid: a1e51e3ae923eae4b83ad89f69cec9c7, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 56
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 56
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &767955482
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 767955479}
m_CullTransparentMesh: 1
--- !u!1 &794248333
GameObject:
m_ObjectHideFlags: 0
@ -1220,6 +1070,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
bootstrapper: {fileID: 1696995256}
googleSignInButton: {fileID: 561952463}
guestLoginButton: {fileID: 1366011439}
--- !u!1 &834550946
GameObject:
m_ObjectHideFlags: 0
@ -2056,6 +1907,7 @@ RectTransform:
- {fileID: 794248334}
- {fileID: 1845972578}
- {fileID: 561952462}
- {fileID: 1366011438}
m_Father: {fileID: 183355944}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@ -2193,6 +2045,127 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1366011437
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1366011438}
- component: {fileID: 1366011441}
- component: {fileID: 1366011440}
- component: {fileID: 1366011439}
m_Layer: 5
m_Name: GuestLoginButton
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1366011438
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1366011437}
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:
- {fileID: 767955480}
m_Father: {fileID: 1285621382}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 150}
m_SizeDelta: {x: 462.4349, y: 105.6994}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &1366011439
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1366011437}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1366011440}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &1366011440
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1366011437}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 6bbcba4e267be464998897741b81d508, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1366011441
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1366011437}
m_CullTransparentMesh: 1
--- !u!1 &1440779027
GameObject:
m_ObjectHideFlags: 0
@ -2606,5 +2579,4 @@ SceneRoots:
- {fileID: 855040266}
- {fileID: 834550948}
- {fileID: 812377085}
- {fileID: 168582916}
- {fileID: 1440779029}

@ -19281,6 +19281,14 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 62565913}
m_Modifications:
- target: {fileID: 315217694452062773, guid: f6670d8117a961048b4a0ff4bbf6d59e, type: 3}
propertyPath: m_text
value: 0
objectReference: {fileID: 0}
- target: {fileID: 436060366358511923, guid: f6670d8117a961048b4a0ff4bbf6d59e, type: 3}
propertyPath: m_text
value: 0
objectReference: {fileID: 0}
- target: {fileID: 490073432889470222, guid: f6670d8117a961048b4a0ff4bbf6d59e, type: 3}
propertyPath: m_RaycastTarget
value: 0
@ -19393,6 +19401,14 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4404033344474101012, guid: f6670d8117a961048b4a0ff4bbf6d59e, type: 3}
propertyPath: m_text
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4404033344474101012, guid: f6670d8117a961048b4a0ff4bbf6d59e, type: 3}
propertyPath: m_fontSize
value: 36
objectReference: {fileID: 0}
- target: {fileID: 4735665652752827894, guid: f6670d8117a961048b4a0ff4bbf6d59e, type: 3}
propertyPath: m_AnchoredPosition.x
value: 50

@ -6,12 +6,13 @@ using static D2D.Utilities.CommonGameplayFacade;
public class LevelSO : ScriptableObject
{
[SerializeField] private Wave[] waves;
[SerializeField] private float totalDuration = 300f;
[SerializeField] private float totalDuration = 100f;
[SerializeField] private float baseXPToLevelUp = 100f;
[SerializeField] private float stepXPOnLevelUp = 50f;
public Wave[] Waves => waves;
public float TotalDuration => totalDuration * (1 + _db.PassedLevels.Value / 10f);
public float TotalDuration => totalDuration + (_db.PassedLevels.Value * 15f);
//public float TotalDuration => totalDuration * (1 + _db.PassedLevels.Value / 10f);
public float BaseXPToLevelUp => baseXPToLevelUp;
public float StepXPOnLevelUp => stepXPOnLevelUp;
public const int LevelUps = 50;

Loading…
Cancel
Save