Tell the user why they can't send requests on self-built instance
This commit is contained in:
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -66,5 +66,5 @@
|
|||||||
"explorer.fileNesting.patterns": {
|
"explorer.fileNesting.patterns": {
|
||||||
"*.sln": "*.csproj"
|
"*.sln": "*.csproj"
|
||||||
},
|
},
|
||||||
"dotnet.defaultSolution": "BerryDash-source.sln"
|
"dotnet.defaultSolution": "BerryDash-src.sln"
|
||||||
}
|
}
|
||||||
@@ -119,6 +119,143 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &31289686
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 31289687}
|
||||||
|
- component: {fileID: 31289689}
|
||||||
|
- component: {fileID: 31289688}
|
||||||
|
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 &31289687
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 31289686}
|
||||||
|
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: 603486473}
|
||||||
|
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 &31289688
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 31289686}
|
||||||
|
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: You are on a self-built instance of the game. You will not be able to access
|
||||||
|
any server endpoints as a result.
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: 4fd546dd0900395408d2de20f5025882, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: -1476194838487357290, guid: 4fd546dd0900395408d2de20f5025882, 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: 24
|
||||||
|
m_fontSizeBase: 24
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
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_TextWrappingMode: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 0
|
||||||
|
m_ActiveFontFeatures: 6e72656b
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 1
|
||||||
|
m_EmojiFallbackSupport: 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 &31289689
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 31289686}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &40776219
|
--- !u!1 &40776219
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1163,6 +1300,99 @@ MonoBehaviour:
|
|||||||
exitButton: {fileID: 1354600018}
|
exitButton: {fileID: 1354600018}
|
||||||
updateText: {fileID: 673338280}
|
updateText: {fileID: 673338280}
|
||||||
updateButton: {fileID: 1292044491}
|
updateButton: {fileID: 1292044491}
|
||||||
|
selfBuiltPanel: {fileID: 603486472}
|
||||||
|
--- !u!1 &603486472
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 603486473}
|
||||||
|
- component: {fileID: 603486475}
|
||||||
|
- component: {fileID: 603486474}
|
||||||
|
- component: {fileID: 603486476}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: SelfBuiltPanel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!224 &603486473
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 603486472}
|
||||||
|
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: 31289687}
|
||||||
|
m_Father: {fileID: 1263503583}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 1, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 0}
|
||||||
|
m_AnchoredPosition: {x: -170, y: 107.5}
|
||||||
|
m_SizeDelta: {x: 300, y: 175}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &603486474
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 603486472}
|
||||||
|
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: 0.28235295, g: 0.28235295, b: 0.28235295, 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: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
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 &603486475
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 603486472}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &603486476
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 603486472}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 9c3738bf0236e043c9bdf9972b8a7375, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
frequency: 8
|
||||||
|
minSize: 1
|
||||||
|
maxSize: 1.1
|
||||||
--- !u!1 &673338277
|
--- !u!1 &673338277
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2157,6 +2387,7 @@ RectTransform:
|
|||||||
- {fileID: 1401523578}
|
- {fileID: 1401523578}
|
||||||
- {fileID: 673338278}
|
- {fileID: 673338278}
|
||||||
- {fileID: 989689724}
|
- {fileID: 989689724}
|
||||||
|
- {fileID: 603486473}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ public class AccountChangePassword : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(changePasswordStatusText, "Encryption/decryption issues", Color.red);
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
AccountHandler.UpdateStatusText(changePasswordStatusText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
break;
|
||||||
case "-1":
|
case "-1":
|
||||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "New Password is too short or too long", Color.red);
|
AccountHandler.UpdateStatusText(changePasswordStatusText, "New Password is too short or too long", Color.red);
|
||||||
break;
|
break;
|
||||||
@@ -88,4 +91,4 @@ public class AccountChangePassword : MonoBehaviour
|
|||||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "Unknown server response " + response, Color.red);
|
AccountHandler.UpdateStatusText(changePasswordStatusText, "Unknown server response " + response, Color.red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,6 +53,9 @@ public class AccountChangeUsername : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
AccountHandler.UpdateStatusText(changeUsernameStatusText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(changeUsernameStatusText, "Encryption/decryption issues", Color.red);
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
AccountHandler.UpdateStatusText(changeUsernameStatusText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
PlayerPrefs.SetString("userName", changeUsernameNewUsernameInput.text);
|
PlayerPrefs.SetString("userName", changeUsernameNewUsernameInput.text);
|
||||||
AccountHandler.instance.SwitchPanel(0);
|
AccountHandler.instance.SwitchPanel(0);
|
||||||
@@ -73,4 +76,4 @@ public class AccountChangeUsername : MonoBehaviour
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,8 @@ public class AccountLoggedIn : MonoBehaviour
|
|||||||
loggedInSaveButton.onClick.AddListener(() => SaveAccount());
|
loggedInSaveButton.onClick.AddListener(() => SaveAccount());
|
||||||
loggedInLoadButton.onClick.AddListener(() => LoadAccount());
|
loggedInLoadButton.onClick.AddListener(() => LoadAccount());
|
||||||
loggedInRefreshLoginButton.onClick.AddListener(() => AccountHandler.instance.SwitchPanel(6));
|
loggedInRefreshLoginButton.onClick.AddListener(() => AccountHandler.instance.SwitchPanel(6));
|
||||||
loggedInLogoutButton.onClick.AddListener(() => {
|
loggedInLogoutButton.onClick.AddListener(() =>
|
||||||
|
{
|
||||||
accountLoggedOut.clearValues = true;
|
accountLoggedOut.clearValues = true;
|
||||||
AccountHandler.instance.SwitchPanel(1);
|
AccountHandler.instance.SwitchPanel(1);
|
||||||
});
|
});
|
||||||
@@ -81,6 +82,9 @@ public class AccountLoggedIn : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
AccountHandler.UpdateStatusText(loggedInText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
AccountHandler.UpdateStatusText(loggedInText, "Synced account", Color.green);
|
AccountHandler.UpdateStatusText(loggedInText, "Synced account", Color.green);
|
||||||
break;
|
break;
|
||||||
@@ -124,6 +128,9 @@ public class AccountLoggedIn : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
AccountHandler.UpdateStatusText(loggedInText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
break;
|
||||||
case "-1":
|
case "-1":
|
||||||
AccountHandler.UpdateStatusText(loggedInText, "Failed to find info about your user (refresh login?)", Color.red);
|
AccountHandler.UpdateStatusText(loggedInText, "Failed to find info about your user (refresh login?)", Color.red);
|
||||||
break;
|
break;
|
||||||
@@ -153,4 +160,4 @@ public class AccountLoggedIn : MonoBehaviour
|
|||||||
loggedInLoadButton.interactable = true;
|
loggedInLoadButton.interactable = true;
|
||||||
loggedInSaveButton.interactable = true;
|
loggedInSaveButton.interactable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,4 +37,4 @@ public class AccountLoggedOut : MonoBehaviour
|
|||||||
clearValues = false;
|
clearValues = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,6 +58,11 @@ public class AccountLogin : MonoBehaviour
|
|||||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(loginPanelStatusText, "Encryption/decryption issues", Color.red);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (response == "-996")
|
||||||
|
{
|
||||||
|
AccountHandler.UpdateStatusText(loginPanelStatusText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if (response == "-1")
|
else if (response == "-1")
|
||||||
{
|
{
|
||||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Incorrect username or password", Color.red);
|
AccountHandler.UpdateStatusText(loginPanelStatusText, "Incorrect username or password", Color.red);
|
||||||
@@ -93,4 +98,4 @@ public class AccountLogin : MonoBehaviour
|
|||||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Unknown server response", Color.red);
|
AccountHandler.UpdateStatusText(loginPanelStatusText, "Unknown server response", Color.red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,11 @@ public class AccountRefreshLogin : MonoBehaviour
|
|||||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Encryption/decryption issues", Color.red);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (response == "-996")
|
||||||
|
{
|
||||||
|
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
return;
|
||||||
|
}
|
||||||
else if (response == "-1")
|
else if (response == "-1")
|
||||||
{
|
{
|
||||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Incorrect username or password", Color.red);
|
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Incorrect username or password", Color.red);
|
||||||
@@ -76,4 +81,4 @@ public class AccountRefreshLogin : MonoBehaviour
|
|||||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Unknown server response", Color.red);
|
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Unknown server response", Color.red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,6 +75,9 @@ public class AccountRegister : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
AccountHandler.UpdateStatusText(registerPanelStatusText, "Encryption/decryption issues", Color.red);
|
AccountHandler.UpdateStatusText(registerPanelStatusText, "Encryption/decryption issues", Color.red);
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
AccountHandler.UpdateStatusText(registerPanelStatusText, "Can't send requests on self-built instance", Color.red);
|
||||||
|
break;
|
||||||
case "1":
|
case "1":
|
||||||
AccountHandler.instance.SwitchPanel(2);
|
AccountHandler.instance.SwitchPanel(2);
|
||||||
break;
|
break;
|
||||||
@@ -95,4 +98,4 @@ public class AccountRegister : MonoBehaviour
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
15
Assets/Scripts/BouncyPanel.cs
Normal file
15
Assets/Scripts/BouncyPanel.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class BouncyPanel : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float frequency = 8f;
|
||||||
|
public float minSize = 1f;
|
||||||
|
public float maxSize = 1.1f;
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
float newsize = (Mathf.Sin(Time.time * frequency) + 1f) / 2f;
|
||||||
|
var size = Mathf.Lerp(minSize, maxSize, newsize);
|
||||||
|
gameObject.transform.localScale = new(size, size, size);
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Assets/Scripts/BouncyPanel.cs.meta
Normal file
2
Assets/Scripts/BouncyPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c3738bf0236e043c9bdf9972b8a7375
|
||||||
@@ -35,8 +35,10 @@ public class ChatroomMenu : MonoBehaviour
|
|||||||
refreshLoopRoutine = StartCoroutine(Loop());
|
refreshLoopRoutine = StartCoroutine(Loop());
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator Loop() {
|
IEnumerator Loop()
|
||||||
while (true) {
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
Refresh();
|
Refresh();
|
||||||
yield return new WaitForSeconds(3f);
|
yield return new WaitForSeconds(3f);
|
||||||
}
|
}
|
||||||
@@ -76,6 +78,9 @@ public class ChatroomMenu : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
ShowStatus("Encryption/decryption issues");
|
ShowStatus("Encryption/decryption issues");
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
ShowStatus("Can't send requests on self-built instance");
|
||||||
|
break;
|
||||||
case "-1":
|
case "-1":
|
||||||
ShowStatus("Authentication error");
|
ShowStatus("Authentication error");
|
||||||
break;
|
break;
|
||||||
@@ -150,6 +155,9 @@ public class ChatroomMenu : MonoBehaviour
|
|||||||
case "-997":
|
case "-997":
|
||||||
ShowStatus("Encryption/decryption issues");
|
ShowStatus("Encryption/decryption issues");
|
||||||
break;
|
break;
|
||||||
|
case "-996":
|
||||||
|
ShowStatus("Can't send requests on self-built instance");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
var split = response.Split(':');
|
var split = response.Split(':');
|
||||||
if (split[0] == "1")
|
if (split[0] == "1")
|
||||||
@@ -215,7 +223,8 @@ public class ChatroomMenu : MonoBehaviour
|
|||||||
{
|
{
|
||||||
playerIcon.color = new Color32(byte.Parse(birdR), byte.Parse(birdG), byte.Parse(birdB), 255);
|
playerIcon.color = new Color32(byte.Parse(birdR), byte.Parse(birdG), byte.Parse(birdB), 255);
|
||||||
playerOverlayIcon.color = new Color32(byte.Parse(overlayR), byte.Parse(overlayG), byte.Parse(overlayB), 255);
|
playerOverlayIcon.color = new Color32(byte.Parse(overlayR), byte.Parse(overlayG), byte.Parse(overlayB), 255);
|
||||||
} catch (Exception)
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
playerIcon.color = Color.white;
|
playerIcon.color = Color.white;
|
||||||
playerOverlayIcon.color = Color.white;
|
playerOverlayIcon.color = Color.white;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using TMPro;
|
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -100,4 +99,4 @@ public class DraggableUI : MonoBehaviour, IDragHandler, IBeginDragHandler
|
|||||||
result = Vector3.zero;
|
result = Vector3.zero;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,8 +6,9 @@ public class EncryptedWWWForm
|
|||||||
|
|
||||||
public void AddField(string key, string value)
|
public void AddField(string key, string value)
|
||||||
{
|
{
|
||||||
form.AddField(SensitiveInfo.Encrypt(key, SensitiveInfo.SERVER_SEND_TRANSFER_KEY), SensitiveInfo.Encrypt(value, SensitiveInfo.SERVER_SEND_TRANSFER_KEY));
|
if (SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY.Trim() != string.Empty && SensitiveInfo.SERVER_SEND_TRANSFER_KEY.Trim() != string.Empty)
|
||||||
|
form.AddField(SensitiveInfo.Encrypt(key, SensitiveInfo.SERVER_SEND_TRANSFER_KEY), SensitiveInfo.Encrypt(value, SensitiveInfo.SERVER_SEND_TRANSFER_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
public WWWForm GetWWWForm() => form;
|
public WWWForm GetWWWForm() => form;
|
||||||
}
|
}
|
||||||
@@ -48,19 +48,19 @@ public class GamePlayer : MonoBehaviour
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Camera.main.backgroundColor = new Color(
|
Camera.main.backgroundColor = new Color(
|
||||||
int.Parse(backgroundColor[0])/255f,
|
int.Parse(backgroundColor[0]) / 255f,
|
||||||
int.Parse(backgroundColor[1])/255f,
|
int.Parse(backgroundColor[1]) / 255f,
|
||||||
int.Parse(backgroundColor[2])/255f
|
int.Parse(backgroundColor[2]) / 255f
|
||||||
);
|
);
|
||||||
bird.GetComponent<SpriteRenderer>().color = new Color(
|
bird.GetComponent<SpriteRenderer>().color = new Color(
|
||||||
int.Parse(birdColor[0])/255f,
|
int.Parse(birdColor[0]) / 255f,
|
||||||
int.Parse(birdColor[1])/255f,
|
int.Parse(birdColor[1]) / 255f,
|
||||||
int.Parse(birdColor[2])/255f
|
int.Parse(birdColor[2]) / 255f
|
||||||
);
|
);
|
||||||
bird.transform.GetChild(0).GetComponent<SpriteRenderer>().color = new Color(
|
bird.transform.GetChild(0).GetComponent<SpriteRenderer>().color = new Color(
|
||||||
int.Parse(overlayColor[0])/255f,
|
int.Parse(overlayColor[0]) / 255f,
|
||||||
int.Parse(overlayColor[1])/255f,
|
int.Parse(overlayColor[1]) / 255f,
|
||||||
int.Parse(overlayColor[2])/255f
|
int.Parse(overlayColor[2]) / 255f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ public class IconsMenuBirdColorPanel : MonoBehaviour
|
|||||||
|
|
||||||
void SlidersChanged()
|
void SlidersChanged()
|
||||||
{
|
{
|
||||||
var col = new Color(rSlider.value/255f, gSlider.value/255f, bSlider.value/255f);
|
var col = new Color(rSlider.value / 255f, gSlider.value / 255f, bSlider.value / 255f);
|
||||||
previewImage.color = col;
|
previewImage.color = col;
|
||||||
hexValue.SetTextWithoutNotify($"#{ColorUtility.ToHtmlStringRGB(col)}");
|
hexValue.SetTextWithoutNotify($"#{ColorUtility.ToHtmlStringRGB(col)}");
|
||||||
PlayerPrefs.SetString("BirdColor", $"{(int)rSlider.value};{(int)gSlider.value};{(int)bSlider.value}");
|
PlayerPrefs.SetString("BirdColor", $"{(int)rSlider.value};{(int)gSlider.value};{(int)bSlider.value}");
|
||||||
PlayerPrefs.Save();
|
PlayerPrefs.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,10 +53,10 @@ public class IconsMenuOverlayColorPanel : MonoBehaviour
|
|||||||
|
|
||||||
void SlidersChanged()
|
void SlidersChanged()
|
||||||
{
|
{
|
||||||
var col = new Color(rSlider.value/255f, gSlider.value/255f, bSlider.value/255f);
|
var col = new Color(rSlider.value / 255f, gSlider.value / 255f, bSlider.value / 255f);
|
||||||
previewImage.color = col;
|
previewImage.color = col;
|
||||||
hexValue.SetTextWithoutNotify($"#{ColorUtility.ToHtmlStringRGB(col)}");
|
hexValue.SetTextWithoutNotify($"#{ColorUtility.ToHtmlStringRGB(col)}");
|
||||||
PlayerPrefs.SetString("OverlayColor", $"{(int)rSlider.value};{(int)gSlider.value};{(int)bSlider.value}");
|
PlayerPrefs.SetString("OverlayColor", $"{(int)rSlider.value};{(int)gSlider.value};{(int)bSlider.value}");
|
||||||
PlayerPrefs.Save();
|
PlayerPrefs.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,4 +3,4 @@ using UnityEngine;
|
|||||||
public class IgnoreRaycast : MonoBehaviour, ICanvasRaycastFilter
|
public class IgnoreRaycast : MonoBehaviour, ICanvasRaycastFilter
|
||||||
{
|
{
|
||||||
public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) => false;
|
public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) => false;
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,8 @@ public class LeaderboardsMenu : MonoBehaviour
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitchMenu(int menu) {
|
void SwitchMenu(int menu)
|
||||||
|
{
|
||||||
UpdateStatus(false, "");
|
UpdateStatus(false, "");
|
||||||
foreach (Transform item in scoreContent.transform)
|
foreach (Transform item in scoreContent.transform)
|
||||||
{
|
{
|
||||||
@@ -125,6 +126,10 @@ public class LeaderboardsMenu : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UpdateStatus(true, "Encryption/decryption issues");
|
UpdateStatus(true, "Encryption/decryption issues");
|
||||||
}
|
}
|
||||||
|
else if (response == "-996")
|
||||||
|
{
|
||||||
|
UpdateStatus(true, "Can't send requests on self-built instance");
|
||||||
|
}
|
||||||
else if (response == "-1")
|
else if (response == "-1")
|
||||||
{
|
{
|
||||||
UpdateStatus(true, "No entries for this leaderboard found!");
|
UpdateStatus(true, "No entries for this leaderboard found!");
|
||||||
@@ -182,7 +187,8 @@ public class LeaderboardsMenu : MonoBehaviour
|
|||||||
{
|
{
|
||||||
playerIcon.color = new Color32(byte.Parse(birdR), byte.Parse(birdG), byte.Parse(birdB), 255);
|
playerIcon.color = new Color32(byte.Parse(birdR), byte.Parse(birdG), byte.Parse(birdB), 255);
|
||||||
playerOverlayIcon.color = new Color32(byte.Parse(overlayR), byte.Parse(overlayG), byte.Parse(overlayB), 255);
|
playerOverlayIcon.color = new Color32(byte.Parse(overlayR), byte.Parse(overlayG), byte.Parse(overlayB), 255);
|
||||||
} catch (Exception)
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
playerIcon.color = Color.white;
|
playerIcon.color = Color.white;
|
||||||
playerOverlayIcon.color = Color.white;
|
playerOverlayIcon.color = Color.white;
|
||||||
@@ -236,6 +242,10 @@ public class LeaderboardsMenu : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UpdateStatus(true, "Encryption/decryption issues");
|
UpdateStatus(true, "Encryption/decryption issues");
|
||||||
}
|
}
|
||||||
|
else if (response == "-996")
|
||||||
|
{
|
||||||
|
UpdateStatus(true, "Can't send requests on self-built instance");
|
||||||
|
}
|
||||||
else if (response == "-1")
|
else if (response == "-1")
|
||||||
{
|
{
|
||||||
UpdateStatus(true, "No entries for this leaderboard found!");
|
UpdateStatus(true, "No entries for this leaderboard found!");
|
||||||
@@ -293,7 +303,8 @@ public class LeaderboardsMenu : MonoBehaviour
|
|||||||
{
|
{
|
||||||
playerIcon.color = new Color32(byte.Parse(birdR), byte.Parse(birdG), byte.Parse(birdB), 255);
|
playerIcon.color = new Color32(byte.Parse(birdR), byte.Parse(birdG), byte.Parse(birdB), 255);
|
||||||
playerOverlayIcon.color = new Color32(byte.Parse(overlayR), byte.Parse(overlayG), byte.Parse(overlayB), 255);
|
playerOverlayIcon.color = new Color32(byte.Parse(overlayR), byte.Parse(overlayG), byte.Parse(overlayB), 255);
|
||||||
} catch (Exception)
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
playerIcon.color = Color.white;
|
playerIcon.color = Color.white;
|
||||||
playerOverlayIcon.color = Color.white;
|
playerOverlayIcon.color = Color.white;
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ public class LoadingMenu : MonoBehaviour
|
|||||||
SetIfNone("Setting4", 0);
|
SetIfNone("Setting4", 0);
|
||||||
Application.targetFrameRate = 360;
|
Application.targetFrameRate = 360;
|
||||||
QualitySettings.vSyncCount = 0;
|
QualitySettings.vSyncCount = 0;
|
||||||
if (Application.platform == RuntimePlatform.WebGLPlayer) {
|
if (Application.platform == RuntimePlatform.WebGLPlayer)
|
||||||
|
{
|
||||||
Screen.fullScreen = false;
|
Screen.fullScreen = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ public class MenuScript : MonoBehaviour
|
|||||||
public Button exitButton;
|
public Button exitButton;
|
||||||
public TMP_Text updateText;
|
public TMP_Text updateText;
|
||||||
public Button updateButton;
|
public Button updateButton;
|
||||||
|
public GameObject selfBuiltPanel;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
@@ -25,5 +26,6 @@ public class MenuScript : MonoBehaviour
|
|||||||
Application.Quit();
|
Application.Quit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (SensitiveInfo.SERVER_RECEIVE_TRANSFER_KEY.Trim() == string.Empty || SensitiveInfo.SERVER_SEND_TRANSFER_KEY.Trim() == string.Empty) selfBuiltPanel.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ public class SensitiveInfo
|
|||||||
|
|
||||||
public static string Encrypt(string plainText, string key)
|
public static string Encrypt(string plainText, string key)
|
||||||
{
|
{
|
||||||
|
if (SERVER_RECEIVE_TRANSFER_KEY.Trim() == string.Empty || SERVER_SEND_TRANSFER_KEY.Trim() == string.Empty) return null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using Aes aes = Aes.Create();
|
using Aes aes = Aes.Create();
|
||||||
@@ -40,6 +41,10 @@ public class SensitiveInfo
|
|||||||
|
|
||||||
public static string Decrypt(string dataB64, string key)
|
public static string Decrypt(string dataB64, string key)
|
||||||
{
|
{
|
||||||
|
if (SERVER_RECEIVE_TRANSFER_KEY.Trim() == string.Empty || SERVER_SEND_TRANSFER_KEY.Trim() == string.Empty)
|
||||||
|
{
|
||||||
|
return "-996";
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var data = Convert.FromBase64String(dataB64);
|
var data = Convert.FromBase64String(dataB64);
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ public class SettingsMenuBgColorPanel : MonoBehaviour
|
|||||||
|
|
||||||
void SlidersChanged()
|
void SlidersChanged()
|
||||||
{
|
{
|
||||||
var col = new Color(rSlider.value/255f, gSlider.value/255f, bSlider.value/255f);
|
var col = new Color(rSlider.value / 255f, gSlider.value / 255f, bSlider.value / 255f);
|
||||||
previewImage.color = col;
|
previewImage.color = col;
|
||||||
hexValue.SetTextWithoutNotify($"#{ColorUtility.ToHtmlStringRGB(col)}");
|
hexValue.SetTextWithoutNotify($"#{ColorUtility.ToHtmlStringRGB(col)}");
|
||||||
PlayerPrefs.SetString("BackgroundColor", $"{(int)rSlider.value};{(int)gSlider.value};{(int)bSlider.value}");
|
PlayerPrefs.SetString("BackgroundColor", $"{(int)rSlider.value};{(int)gSlider.value};{(int)bSlider.value}");
|
||||||
PlayerPrefs.Save();
|
PlayerPrefs.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user