Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3999f810a3
|
|||
|
22c7e2f570
|
|||
|
077f5c324c
|
|||
|
cf3c5388c5
|
|||
|
42c1d2d48c
|
|||
|
d62ea4d09b
|
|||
|
98782c8ce9
|
|||
|
64836dbe4b
|
|||
|
dec3995449
|
|||
|
f9231e568f
|
|||
|
768e41017b
|
|||
|
c4f3647809
|
|||
|
bc9d8693fb
|
|||
|
048d6d4734
|
|||
|
50a4701c37
|
|||
|
8e41b26f63
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
f309,f111,f141,f04c,f0e2,f077,f061,f060,f0c8,f00c,f00d,f303,f2ed
|
||||
f309,f111,f141,f04c,f0e2,f077,f061,f060,f0c8,f00c,f00d,f303,f2ed,f0b0
|
||||
|
||||
@@ -1432,6 +1432,8 @@ MonoBehaviour:
|
||||
songLoop: {fileID: 1625416039}
|
||||
musicSlider: {fileID: 208042169}
|
||||
sfxSlider: {fileID: 604620478}
|
||||
musicSliderText: {fileID: 1859415099}
|
||||
sfxSliderText: {fileID: 699129040}
|
||||
fpsText: {fileID: 83812371}
|
||||
scoreText: {fileID: 432923591}
|
||||
highScoreText: {fileID: 1606868532}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -29,13 +29,13 @@ public class AccountChangePassword : MonoBehaviour
|
||||
|
||||
async void ChangePassword()
|
||||
{
|
||||
changePasswordBackButton.interactable = false;
|
||||
if (changePasswordNewPasswordInput.text != changePasswordRetypeNewPasswordInput.text)
|
||||
{
|
||||
changePasswordBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changePasswordStatusText, "Passwords do not match", Color.red);
|
||||
return;
|
||||
}
|
||||
changePasswordBackButton.interactable = false;
|
||||
changePasswordSubmitButton.interactable = false;
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("oldpassword", changePasswordCurrentPasswordInput.text);
|
||||
dataForm.AddField("newpassword", changePasswordNewPasswordInput.text);
|
||||
@@ -49,33 +49,26 @@ public class AccountChangePassword : MonoBehaviour
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
changePasswordBackButton.interactable = true;
|
||||
changePasswordSubmitButton.interactable = true;
|
||||
Tools.UpdateStatusText(changePasswordStatusText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
}
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
changePasswordBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changePasswordStatusText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
changePasswordBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changePasswordStatusText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
changePasswordBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changePasswordStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
changePasswordBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changePasswordStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -92,5 +85,6 @@ public class AccountChangePassword : MonoBehaviour
|
||||
}
|
||||
}
|
||||
changePasswordBackButton.interactable = true;
|
||||
changePasswordSubmitButton.interactable = true;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public class AccountChangeUsername : MonoBehaviour
|
||||
async void ChangeUsername()
|
||||
{
|
||||
changeUsernameBackButton.interactable = false;
|
||||
changeUsernameSubmitButton.interactable = false;
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("oldusername", changeUsernameCurrentUsernameInput.text);
|
||||
dataForm.AddField("newusername", changeUsernameNewUsernameInput.text);
|
||||
@@ -41,33 +42,26 @@ public class AccountChangeUsername : MonoBehaviour
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
changeUsernameBackButton.interactable = true;
|
||||
changeUsernameSubmitButton.interactable = true;
|
||||
Tools.UpdateStatusText(changeUsernameStatusText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
}
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
changeUsernameBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changeUsernameStatusText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
changeUsernameBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changeUsernameStatusText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
changeUsernameBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changeUsernameStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
changeUsernameBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(changeUsernameStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -84,5 +78,6 @@ public class AccountChangeUsername : MonoBehaviour
|
||||
}
|
||||
}
|
||||
changeUsernameBackButton.interactable = true;
|
||||
changeUsernameSubmitButton.interactable = true;
|
||||
}
|
||||
}
|
||||
@@ -44,8 +44,12 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
|
||||
async void SaveAccount()
|
||||
{
|
||||
loggedInLoadButton.interactable = false;
|
||||
loggedInChangeUsernameButton.interactable = false;
|
||||
loggedInChangePasswordButton.interactable = false;
|
||||
loggedInSaveButton.interactable = false;
|
||||
loggedInLoadButton.interactable = false;
|
||||
loggedInRefreshLoginButton.interactable = false;
|
||||
loggedInLogoutButton.interactable = false;
|
||||
loggedInBackButton.interactable = false;
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("username", BazookaManager.Instance.GetAccountName());
|
||||
@@ -58,8 +62,12 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
await request.SendWebRequest();
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInChangeUsernameButton.interactable = true;
|
||||
loggedInChangePasswordButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInRefreshLoginButton.interactable = true;
|
||||
loggedInLogoutButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
@@ -67,35 +75,19 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,15 +101,23 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
Tools.UpdateStatusText(loggedInText, (string)jsonResponse["message"], Color.red);
|
||||
}
|
||||
}
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInChangeUsernameButton.interactable = true;
|
||||
loggedInChangePasswordButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInRefreshLoginButton.interactable = true;
|
||||
loggedInLogoutButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
}
|
||||
|
||||
async void LoadAccount()
|
||||
{
|
||||
loggedInLoadButton.interactable = false;
|
||||
loggedInChangeUsernameButton.interactable = false;
|
||||
loggedInChangePasswordButton.interactable = false;
|
||||
loggedInSaveButton.interactable = false;
|
||||
loggedInLoadButton.interactable = false;
|
||||
loggedInRefreshLoginButton.interactable = false;
|
||||
loggedInLogoutButton.interactable = false;
|
||||
loggedInBackButton.interactable = false;
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("token", BazookaManager.Instance.GetAccountSession());
|
||||
@@ -129,8 +129,12 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
await request.SendWebRequest();
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInChangeUsernameButton.interactable = true;
|
||||
loggedInChangePasswordButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInRefreshLoginButton.interactable = true;
|
||||
loggedInLogoutButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
@@ -138,35 +142,19 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loggedInText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -181,8 +169,12 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
Tools.UpdateStatusText(loggedInText, (string)jsonResponse["message"], Color.red);
|
||||
}
|
||||
}
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInChangeUsernameButton.interactable = true;
|
||||
loggedInChangePasswordButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInRefreshLoginButton.interactable = true;
|
||||
loggedInLogoutButton.interactable = true;
|
||||
loggedInBackButton.interactable = true;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Numerics;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
@@ -30,6 +29,7 @@ public class AccountLogin : MonoBehaviour
|
||||
async void SubmitLogin()
|
||||
{
|
||||
loginBackButton.interactable = false;
|
||||
loginSubmitButton.interactable = false;
|
||||
if (loginUsernameInput.text == string.Empty || loginPasswordInput.text == string.Empty)
|
||||
{
|
||||
Tools.UpdateStatusText(loginPanelStatusText, "All input fields must be filled", Color.red);
|
||||
@@ -47,33 +47,26 @@ public class AccountLogin : MonoBehaviour
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
loginBackButton.interactable = true;
|
||||
loginSubmitButton.interactable = true;
|
||||
Tools.UpdateStatusText(loginPanelStatusText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
}
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
loginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loginPanelStatusText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
loginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loginPanelStatusText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
loginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loginPanelStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
loginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(loginPanelStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -92,5 +85,6 @@ public class AccountLogin : MonoBehaviour
|
||||
}
|
||||
}
|
||||
loginBackButton.interactable = true;
|
||||
loginSubmitButton.interactable = true;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public class AccountRefreshLogin : MonoBehaviour
|
||||
async void RefreshLogin()
|
||||
{
|
||||
refreshLoginBackButton.interactable = false;
|
||||
refreshLoginSubmitButton.interactable = false;
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("username", refreshLoginUsernameInput.text);
|
||||
dataForm.AddField("password", refreshLoginPasswordInput.text);
|
||||
@@ -39,33 +40,26 @@ public class AccountRefreshLogin : MonoBehaviour
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
refreshLoginBackButton.interactable = true;
|
||||
refreshLoginSubmitButton.interactable = true;
|
||||
Tools.UpdateStatusText(refreshLoginStatusText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
}
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
refreshLoginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(refreshLoginStatusText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
refreshLoginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(refreshLoginStatusText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
refreshLoginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(refreshLoginStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
refreshLoginBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(refreshLoginStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -84,5 +78,6 @@ public class AccountRefreshLogin : MonoBehaviour
|
||||
}
|
||||
}
|
||||
refreshLoginBackButton.interactable = true;
|
||||
refreshLoginSubmitButton.interactable = true;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,6 @@ public class AccountRegister : MonoBehaviour
|
||||
|
||||
async void SubmitRegister()
|
||||
{
|
||||
registerBackButton.interactable = false;
|
||||
if (
|
||||
registerUsernameInput.text == string.Empty ||
|
||||
registerEmailInput.text == string.Empty ||
|
||||
@@ -42,22 +41,21 @@ public class AccountRegister : MonoBehaviour
|
||||
registerRetypePasswordInput.text == string.Empty
|
||||
)
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "All input fields must be filled", Color.red);
|
||||
return;
|
||||
}
|
||||
if (registerEmailInput.text != registerRetypeEmailInput.text)
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Emails don't match", Color.red);
|
||||
return;
|
||||
}
|
||||
if (registerPasswordInput.text != registerRetypePasswordInput.text)
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Passwords don't match", Color.red);
|
||||
return;
|
||||
}
|
||||
registerBackButton.interactable = false;
|
||||
registerSubmitButton.interactable = false;
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("username", registerUsernameInput.text);
|
||||
dataForm.AddField("email", registerEmailInput.text);
|
||||
@@ -70,33 +68,26 @@ public class AccountRegister : MonoBehaviour
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
registerSubmitButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Failed to make HTTP request", Color.red);
|
||||
return;
|
||||
}
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Server error while fetching data", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Client version too outdated to access servers", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
registerBackButton.interactable = true;
|
||||
Tools.UpdateStatusText(registerPanelStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -111,5 +102,6 @@ public class AccountRegister : MonoBehaviour
|
||||
}
|
||||
}
|
||||
registerBackButton.interactable = true;
|
||||
registerSubmitButton.interactable = true;
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,10 @@ public class BazookaManager : MonoBehaviour
|
||||
Debug.LogWarning("Failed to load save file");
|
||||
}
|
||||
}
|
||||
if (saveFile["version"] == null || saveFile["version"].ToString() != "0")
|
||||
{
|
||||
saveFile["version"] = "0";
|
||||
}
|
||||
if (!PlayerPrefs.HasKey("LegacyConversion"))
|
||||
{
|
||||
PlayerPrefs.SetInt("LegacyConversion", 1);
|
||||
|
||||
@@ -50,35 +50,29 @@ public class GamePlayer : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
var backgroundColor = BazookaManager.Instance.GetColorSettingBackground();
|
||||
Camera.main.backgroundColor = new Color(
|
||||
int.Parse(backgroundColor[0].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[1].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[2].ToString()) / 255f
|
||||
);
|
||||
|
||||
var customIconData = BazookaManager.Instance.GetCustomBirdIconData();
|
||||
SpriteRenderer component = bird.GetComponent<SpriteRenderer>();
|
||||
if (customIconData.Selected == null)
|
||||
{
|
||||
var backgroundColor = BazookaManager.Instance.GetColorSettingBackground();
|
||||
var birdColor = BazookaManager.Instance.GetColorSettingIcon();
|
||||
var overlayColor = BazookaManager.Instance.GetColorSettingOverlay();
|
||||
try
|
||||
{
|
||||
Camera.main.backgroundColor = new Color(
|
||||
int.Parse(backgroundColor[0].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[1].ToString()) / 255f,
|
||||
int.Parse(backgroundColor[2].ToString()) / 255f
|
||||
);
|
||||
bird.GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(birdColor[0].ToString()) / 255f,
|
||||
int.Parse(birdColor[1].ToString()) / 255f,
|
||||
int.Parse(birdColor[2].ToString()) / 255f
|
||||
);
|
||||
bird.transform.GetChild(0).GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(overlayColor[0].ToString()) / 255f,
|
||||
int.Parse(overlayColor[1].ToString()) / 255f,
|
||||
int.Parse(overlayColor[2].ToString()) / 255f
|
||||
);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.LogError("Invalid BackgroundColor format");
|
||||
}
|
||||
bird.GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(birdColor[0].ToString()) / 255f,
|
||||
int.Parse(birdColor[1].ToString()) / 255f,
|
||||
int.Parse(birdColor[2].ToString()) / 255f
|
||||
);
|
||||
bird.transform.GetChild(0).GetComponent<SpriteRenderer>().color = new Color(
|
||||
int.Parse(overlayColor[0].ToString()) / 255f,
|
||||
int.Parse(overlayColor[1].ToString()) / 255f,
|
||||
int.Parse(overlayColor[2].ToString()) / 255f
|
||||
);
|
||||
|
||||
int num = BazookaManager.Instance.GetBirdIcon();
|
||||
int num2 = BazookaManager.Instance.GetBirdOverlay();
|
||||
@@ -318,7 +312,7 @@ public class GamePlayer : MonoBehaviour
|
||||
GameObject newBerry = new("Berry");
|
||||
newBerry.transform.SetParent(berryParent.transform);
|
||||
SpriteRenderer spriteRenderer = newBerry.AddComponent<SpriteRenderer>();
|
||||
if (spawnProbability <= 0.6f)
|
||||
if (spawnProbability <= 0.525f)
|
||||
{
|
||||
spriteRenderer.sprite = Resources.Load<Sprite>("Berries/Berry");
|
||||
newBerry.tag = "NormalBerry";
|
||||
|
||||
@@ -12,6 +12,8 @@ public class GamePlayerPauseMenu : MonoBehaviour
|
||||
public AudioSource songLoop;
|
||||
public Slider musicSlider;
|
||||
public Slider sfxSlider;
|
||||
public TMP_Text musicSliderText;
|
||||
public TMP_Text sfxSliderText;
|
||||
public TMP_Text fpsText;
|
||||
public TMP_Text scoreText;
|
||||
public TMP_Text highScoreText;
|
||||
@@ -80,6 +82,8 @@ public class GamePlayerPauseMenu : MonoBehaviour
|
||||
editingUI = !editingUI;
|
||||
musicSlider.gameObject.SetActive(!musicSlider.gameObject.activeSelf);
|
||||
sfxSlider.gameObject.SetActive(!sfxSlider.gameObject.activeSelf);
|
||||
musicSliderText.gameObject.SetActive(musicSlider.gameObject.activeSelf);
|
||||
sfxSliderText.gameObject.SetActive(sfxSlider.gameObject.activeSelf);
|
||||
backButton.gameObject.SetActive(!backButton.gameObject.activeSelf);
|
||||
continueButton.gameObject.SetActive(!continueButton.gameObject.activeSelf);
|
||||
editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text = editUiButton.transform.GetChild(0).GetComponent<TMP_Text>().text == "Edit UI" ? "Done" : "Edit UI";
|
||||
|
||||
@@ -9,7 +9,7 @@ using UnityEngine.UI;
|
||||
|
||||
public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
{
|
||||
private static WaitForSeconds _waitForSeconds2 = new(2f);
|
||||
private readonly static WaitForSeconds _waitForSeconds2 = new(2f);
|
||||
public IconMarketplaceManager marketplaceManager;
|
||||
public TMP_Text statusText;
|
||||
public TMP_Text balanceText;
|
||||
@@ -18,10 +18,75 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
public GameObject sample;
|
||||
private string statusMessage;
|
||||
private Coroutine statusRoutine;
|
||||
public Button refreshButton;
|
||||
public Button optionsButton;
|
||||
public GameObject optionsPanel;
|
||||
public Button optionsPanelSubmitButton;
|
||||
public TMP_Dropdown optionsPanelSortByDropdown;
|
||||
public Toggle optionsPanelPriceRangeToggle;
|
||||
public TMP_InputField optionsPanelPriceRangeMinInput;
|
||||
public TMP_InputField optionsPanelPriceRangeMaxInput;
|
||||
public Toggle optionsPanelSearchForToggle;
|
||||
public TMP_InputField optionsPanelSearchForInputField;
|
||||
|
||||
public bool priceRangeEnabled = false;
|
||||
public string priceRangeMin = "10";
|
||||
public string priceRangeMax = "250";
|
||||
|
||||
public bool searchForEnabled = false;
|
||||
public string searchForValue = "";
|
||||
|
||||
public bool anyChanges = false;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
backButton.onClick.AddListener(() => marketplaceManager.SwitchPanel(0));
|
||||
refreshButton.onClick.AddListener(GetIcons);
|
||||
optionsButton.onClick.AddListener(() => optionsPanel.SetActive(true));
|
||||
optionsPanelSubmitButton.onClick.AddListener(() =>
|
||||
{
|
||||
optionsPanel.SetActive(false);
|
||||
if (anyChanges)
|
||||
{
|
||||
anyChanges = false;
|
||||
GetIcons();
|
||||
}
|
||||
});
|
||||
|
||||
optionsPanelPriceRangeToggle.onValueChanged.AddListener((on) =>
|
||||
{
|
||||
anyChanges = true;
|
||||
if (!on)
|
||||
{
|
||||
optionsPanelPriceRangeMinInput.text = "10";
|
||||
optionsPanelPriceRangeMaxInput.text = "250";
|
||||
}
|
||||
optionsPanelPriceRangeMinInput.interactable = on;
|
||||
optionsPanelPriceRangeMaxInput.interactable = on;
|
||||
});
|
||||
optionsPanelSearchForToggle.onValueChanged.AddListener((on) =>
|
||||
{
|
||||
anyChanges = true;
|
||||
optionsPanelSearchForInputField.text = "";
|
||||
optionsPanelSearchForInputField.interactable = on;
|
||||
});
|
||||
|
||||
optionsPanelSortByDropdown.onValueChanged.AddListener((_) => anyChanges = true);
|
||||
optionsPanelPriceRangeMinInput.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
anyChanges = true;
|
||||
priceRangeMin = value;
|
||||
});
|
||||
optionsPanelPriceRangeMaxInput.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
anyChanges = true;
|
||||
priceRangeMax = value;
|
||||
});
|
||||
optionsPanelSearchForInputField.onValueChanged.AddListener((value) =>
|
||||
{
|
||||
anyChanges = true;
|
||||
searchForValue = value;
|
||||
});
|
||||
}
|
||||
|
||||
internal void Load()
|
||||
@@ -32,6 +97,8 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
|
||||
async void GetIcons()
|
||||
{
|
||||
refreshButton.interactable = false;
|
||||
optionsButton.interactable = false;
|
||||
backButton.interactable = false;
|
||||
foreach (Transform item in content.transform)
|
||||
{
|
||||
@@ -41,13 +108,22 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
}
|
||||
}
|
||||
ShowStatus("Loading...");
|
||||
using UnityWebRequest request = UnityWebRequest.Get(SensitiveInfo.SERVER_DATABASE_PREFIX + "getMarketplaceIcons.php");
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("sortBy", optionsPanelSortByDropdown.value.ToString());
|
||||
dataForm.AddField("priceRangeEnabled", priceRangeEnabled.ToString());
|
||||
dataForm.AddField("priceRangeMin", priceRangeMin);
|
||||
dataForm.AddField("priceRangeMax", priceRangeMax);
|
||||
dataForm.AddField("searchForEnabled", searchForEnabled.ToString());
|
||||
dataForm.AddField("searchForValue", searchForValue);
|
||||
using UnityWebRequest request = UnityWebRequest.Post(SensitiveInfo.SERVER_DATABASE_PREFIX + "getMarketplaceIcons.php", dataForm.form);
|
||||
request.SetRequestHeader("Requester", "BerryDashClient");
|
||||
request.SetRequestHeader("ClientVersion", Application.version);
|
||||
request.SetRequestHeader("ClientPlatform", Application.platform.ToString());
|
||||
await request.SendWebRequest();
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
refreshButton.interactable = true;
|
||||
optionsButton.interactable = true;
|
||||
backButton.interactable = true;
|
||||
ShowStatus("Failed to make HTTP request");
|
||||
return;
|
||||
@@ -55,27 +131,19 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
backButton.interactable = true;
|
||||
ShowStatus("Server error while fetching data");
|
||||
return;
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
backButton.interactable = true;
|
||||
ShowStatus("Client version too outdated to access servers");
|
||||
return;
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
backButton.interactable = true;
|
||||
ShowStatus("Encryption/decryption issues");
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
backButton.interactable = true;
|
||||
ShowStatus("Can't send requests on self-built instance");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -124,6 +192,8 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
||||
newIcon.SetActive(true);
|
||||
}
|
||||
}
|
||||
refreshButton.interactable = true;
|
||||
optionsButton.interactable = true;
|
||||
backButton.interactable = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
public GameObject selectionPanel;
|
||||
public Button selectionScoreButton;
|
||||
public Button selectionBerryButton;
|
||||
public Button selectionCoinButton;
|
||||
|
||||
public GameObject scorePanel;
|
||||
public GameObject scoreContent;
|
||||
@@ -26,12 +27,18 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
public GameObject berryContent;
|
||||
public TMP_Dropdown berryShowTypeDropdown;
|
||||
public GameObject berrySampleObject;
|
||||
|
||||
public GameObject coinPanel;
|
||||
public GameObject coinContent;
|
||||
public GameObject coinSampleObject;
|
||||
|
||||
public Dictionary<string, string> customIcons;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
selectionScoreButton.onClick.AddListener(() => SwitchMenu(1));
|
||||
selectionBerryButton.onClick.AddListener(() => SwitchMenu(2));
|
||||
selectionCoinButton.onClick.AddListener(() => SwitchMenu(3));
|
||||
|
||||
berryShowTypeDropdown.onValueChanged.AddListener(value => GetTopPlayersBerry(value));
|
||||
|
||||
@@ -39,12 +46,13 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
backButton.onClick.AddListener(async () =>
|
||||
{
|
||||
if (selectionPanel.activeSelf) await SceneManager.LoadSceneAsync("MainMenu");
|
||||
else if (scorePanel.activeSelf || berryPanel.activeSelf) SwitchMenu(0);
|
||||
else if (scorePanel.activeSelf || berryPanel.activeSelf || coinPanel.activeSelf) SwitchMenu(0);
|
||||
});
|
||||
refreshButton.onClick.AddListener(() =>
|
||||
{
|
||||
if (scorePanel.activeSelf) GetTopPlayersScore();
|
||||
else if (berryPanel.activeSelf) GetTopPlayersBerry(berryShowTypeDropdown.value);
|
||||
else if (coinPanel.activeSelf) GetTopPlayersCoin();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -71,6 +79,16 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (coinPanel.activeSelf)
|
||||
{
|
||||
foreach (Transform item in coinContent.transform)
|
||||
{
|
||||
if (item.gameObject.activeSelf)
|
||||
{
|
||||
Destroy(item.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (menu)
|
||||
{
|
||||
@@ -79,6 +97,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
selectionPanel.SetActive(true);
|
||||
scorePanel.SetActive(false);
|
||||
berryPanel.SetActive(false);
|
||||
coinPanel.SetActive(false);
|
||||
break;
|
||||
case 1:
|
||||
refreshButton.transform.localPosition = new UnityEngine.Vector2(-402.5f, -282.33f);
|
||||
@@ -87,6 +106,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
selectionPanel.SetActive(false);
|
||||
scorePanel.SetActive(true);
|
||||
berryPanel.SetActive(false);
|
||||
coinPanel.SetActive(false);
|
||||
break;
|
||||
case 2:
|
||||
refreshButton.transform.localPosition = new UnityEngine.Vector2(402.5f, 282.33f);
|
||||
@@ -96,6 +116,16 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
selectionPanel.SetActive(false);
|
||||
scorePanel.SetActive(false);
|
||||
berryPanel.SetActive(true);
|
||||
coinPanel.SetActive(false);
|
||||
break;
|
||||
case 3:
|
||||
refreshButton.transform.localPosition = new UnityEngine.Vector2(-402.5f, -282.33f);
|
||||
refreshButton.gameObject.SetActive(true);
|
||||
GetTopPlayersCoin();
|
||||
selectionPanel.SetActive(false);
|
||||
scorePanel.SetActive(false);
|
||||
berryPanel.SetActive(false);
|
||||
coinPanel.SetActive(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -273,10 +303,12 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
var jsonResponse = JArray.Parse(response);
|
||||
for (int i = 0; i < jsonResponse.Count; i++)
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
var entries = (JArray)jsonResponse["entries"];
|
||||
customIcons = jsonResponse["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
for (int i = 0; i < entries.Count; i++)
|
||||
{
|
||||
var entry = JObject.Parse(jsonResponse[i].ToString());
|
||||
var entry = JObject.Parse(entries[i].ToString());
|
||||
var username = (string)entry["username"];
|
||||
var highScore = BigInteger.Parse((string)entry["value"]);
|
||||
var icon = (int)entry["icon"];
|
||||
@@ -284,6 +316,7 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
var uid = BigInteger.Parse((string)entry["userid"]);
|
||||
var birdColor = (JArray)entry["birdColor"];
|
||||
var overlayColor = (JArray)entry["overlayColor"];
|
||||
var customIcon = (string)entry["customIcon"];
|
||||
|
||||
var entryInfo = Instantiate(berrySampleObject, berryContent.transform);
|
||||
var usernameText = entryInfo.transform.GetChild(0).GetComponent<TMP_Text>();
|
||||
@@ -299,38 +332,46 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
|
||||
usernameText.text = $"{username} (#{i + 1})";
|
||||
highScoreText.text += Tools.FormatWithCommas(highScore);
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
playerOverlayIcon.color = new Color((int)overlayColor[0] / 255f, (int)overlayColor[1] / 255f, (int)overlayColor[2] / 255f);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
playerIcon.color = Color.white;
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
playerOverlayIcon.color = new Color((int)overlayColor[0] / 255f, (int)overlayColor[1] / 255f, (int)overlayColor[2] / 255f);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
playerIcon.color = Color.white;
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
}
|
||||
@@ -344,6 +385,132 @@ public class LeaderboardsMenu : MonoBehaviour
|
||||
refreshButton.interactable = true;
|
||||
}
|
||||
|
||||
async void GetTopPlayersCoin()
|
||||
{
|
||||
backButton.interactable = false;
|
||||
refreshButton.interactable = false;
|
||||
foreach (Transform item in coinContent.transform)
|
||||
{
|
||||
if (item.gameObject.activeSelf)
|
||||
{
|
||||
Destroy(item.gameObject);
|
||||
}
|
||||
}
|
||||
UpdateStatus(true, "Loading...");
|
||||
EncryptedWWWForm dataForm = new();
|
||||
dataForm.AddField("type", "2");
|
||||
using UnityWebRequest request = UnityWebRequest.Post(SensitiveInfo.SERVER_DATABASE_PREFIX + "getTopPlayers.php", dataForm.form);
|
||||
request.SetRequestHeader("Requester", "BerryDashClient");
|
||||
request.SetRequestHeader("ClientVersion", Application.version);
|
||||
request.SetRequestHeader("ClientPlatform", Application.platform.ToString());
|
||||
await request.SendWebRequest();
|
||||
if (request.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
UpdateStatus(false);
|
||||
string response = SensitiveInfo.Decrypt(request.downloadHandler.text, SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY);
|
||||
if (response == "-999")
|
||||
{
|
||||
UpdateStatus(true, "Server error while fetching data");
|
||||
}
|
||||
else if (response == "-998")
|
||||
{
|
||||
UpdateStatus(true, "Client version too outdated to access servers");
|
||||
}
|
||||
else if (response == "-997")
|
||||
{
|
||||
UpdateStatus(true, "Encryption/decryption issues");
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
UpdateStatus(true, "Can't send requests on self-built instance");
|
||||
}
|
||||
else if (response == "-1")
|
||||
{
|
||||
UpdateStatus(true, "No entries for this leaderboard found!");
|
||||
}
|
||||
else
|
||||
{
|
||||
var jsonResponse = JObject.Parse(response);
|
||||
var entries = (JArray)jsonResponse["entries"];
|
||||
customIcons = jsonResponse["customIcons"].ToObject<Dictionary<string, string>>();
|
||||
for (int i = 0; i < entries.Count; i++)
|
||||
{
|
||||
var entry = JObject.Parse(entries[i].ToString());
|
||||
var username = (string)entry["username"];
|
||||
var highScore = BigInteger.Parse((string)entry["value"]);
|
||||
var icon = (int)entry["icon"];
|
||||
var overlay = (int)entry["overlay"];
|
||||
var uid = BigInteger.Parse((string)entry["userid"]);
|
||||
var birdColor = (JArray)entry["birdColor"];
|
||||
var overlayColor = (JArray)entry["overlayColor"];
|
||||
var customIcon = (string)entry["customIcon"];
|
||||
|
||||
var entryInfo = Instantiate(coinSampleObject, coinContent.transform);
|
||||
var usernameText = entryInfo.transform.GetChild(0).GetComponent<TMP_Text>();
|
||||
var playerIcon = usernameText.transform.GetChild(0).GetComponent<Image>();
|
||||
var playerOverlayIcon = playerIcon.transform.GetChild(0).GetComponent<Image>();
|
||||
var highScoreText = entryInfo.transform.GetChild(1).GetComponent<TMP_Text>();
|
||||
|
||||
if (BazookaManager.Instance.GetAccountID() == uid)
|
||||
{
|
||||
usernameText.color = Color.aquamarine;
|
||||
highScoreText.color = Color.aquamarine;
|
||||
}
|
||||
|
||||
usernameText.text = $"{username} (#{i + 1})";
|
||||
highScoreText.text += Tools.FormatWithCommas(highScore);
|
||||
if (customIcon == null)
|
||||
{
|
||||
playerIcon.sprite = Resources.Load<Sprite>("Icons/Icons/bird_" + icon);
|
||||
if (icon == 1)
|
||||
{
|
||||
playerIcon.sprite = Tools.GetIconForUser(uid);
|
||||
}
|
||||
playerOverlayIcon.sprite = Resources.Load<Sprite>("Icons/Overlays/overlay_" + overlay);
|
||||
if (overlay == 0)
|
||||
{
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
else if (overlay == 8)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.56f, 14.81f);
|
||||
}
|
||||
else if (overlay == 11)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-14.74451f, 20.39122f);
|
||||
}
|
||||
else if (overlay == 13)
|
||||
{
|
||||
playerOverlayIcon.transform.localPosition = new UnityEngine.Vector2(-16.54019f, 14.70365f);
|
||||
}
|
||||
try
|
||||
{
|
||||
playerIcon.color = new Color((int)birdColor[0] / 255f, (int)birdColor[1] / 255f, (int)birdColor[2] / 255f);
|
||||
playerOverlayIcon.color = new Color((int)overlayColor[0] / 255f, (int)overlayColor[1] / 255f, (int)overlayColor[2] / 255f);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
playerIcon.color = Color.white;
|
||||
playerOverlayIcon.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Tools.RenderFromBase64(customIcons[customIcon], playerIcon);
|
||||
playerOverlayIcon.gameObject.SetActive(false);
|
||||
}
|
||||
entryInfo.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateStatus(true, "Failed to fetch leaderboard stats");
|
||||
}
|
||||
backButton.interactable = true;
|
||||
refreshButton.interactable = true;
|
||||
}
|
||||
|
||||
private void UpdateStatus(bool enabled, string message = "")
|
||||
{
|
||||
statusText.gameObject.SetActive(enabled);
|
||||
|
||||
@@ -141,7 +141,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: 1.6.1
|
||||
bundleVersion: 1.6.3
|
||||
preloadedAssets:
|
||||
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||
metroInputSource: 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Berry Dash
|
||||
|
||||
Berry dash is a simple Strategy/Casual game where you catch berries to get a high sccore, with leaderboards, chatroom, customizable icons, community icons and more!
|
||||
Berry dash is a simple Strategy/Casual game where you catch berries to get a high score, with leaderboards, chatroom, customizable icons, icon marketplace (in game currency, no real life purchases are in this game) and more!
|
||||
|
||||
The server source code can be found [here](https://github.com/BerryDash/server) along with guides on how to make a berry dash private server.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user