adding in some needed packages
This commit is contained in:
parent
9e739f5dc8
commit
aba5310742
1012 changed files with 494191 additions and 1 deletions
22
Assets/LeaderboardCreator/Scripts/Utils/ConstantVariables.cs
Executable file
22
Assets/LeaderboardCreator/Scripts/Utils/ConstantVariables.cs
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
using Dan.Enums;
|
||||
|
||||
namespace Dan
|
||||
{
|
||||
internal static class ConstantVariables
|
||||
{
|
||||
internal const string GUID_KEY = "LEADERBOARD_CREATOR___LOCAL_GUID";
|
||||
|
||||
internal static string GetServerURL(Routes route = Routes.None, string extra = "")
|
||||
{
|
||||
return SERVER_URL + (route == Routes.Authorize ? "/authorize" :
|
||||
route == Routes.Get ? "/get" :
|
||||
route == Routes.Upload ? "/entry/upload" :
|
||||
route == Routes.UpdateUsername ? "/entry/update-username" :
|
||||
route == Routes.DeleteEntry ? "/entry/delete" :
|
||||
route == Routes.GetPersonalEntry ? "/entry/get" :
|
||||
route == Routes.GetEntryCount ? "/entry/count" : "/") + extra;
|
||||
}
|
||||
|
||||
private const string SERVER_URL = "https://lcv2-server.danqzq.games";
|
||||
}
|
||||
}
|
||||
3
Assets/LeaderboardCreator/Scripts/Utils/ConstantVariables.cs.meta
Executable file
3
Assets/LeaderboardCreator/Scripts/Utils/ConstantVariables.cs.meta
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8ba37bb8809248c793a754c692830a1b
|
||||
timeCreated: 1660731015
|
||||
10
Assets/LeaderboardCreator/Scripts/Utils/ExtensionMethods.cs
Executable file
10
Assets/LeaderboardCreator/Scripts/Utils/ExtensionMethods.cs
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Dan
|
||||
{
|
||||
public static class ExtensionMethods
|
||||
{
|
||||
public static string SplitByUppercase(this string str) =>
|
||||
Regex.Replace(str, @"(\B[A-Z]+?(?=[A-Z][^A-Z])|\B[A-Z]+?(?=[^A-Z]))", " $1");
|
||||
}
|
||||
}
|
||||
3
Assets/LeaderboardCreator/Scripts/Utils/ExtensionMethods.cs.meta
Executable file
3
Assets/LeaderboardCreator/Scripts/Utils/ExtensionMethods.cs.meta
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 07c46008f49546899a5404ae5730f8e5
|
||||
timeCreated: 1660647932
|
||||
23
Assets/LeaderboardCreator/Scripts/Utils/LeaderboardCreatorConfig.cs
Executable file
23
Assets/LeaderboardCreator/Scripts/Utils/LeaderboardCreatorConfig.cs
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Dan
|
||||
{
|
||||
public enum AuthSaveMode
|
||||
{
|
||||
PlayerPrefs,
|
||||
PersistentDataPath,
|
||||
Unhandled
|
||||
}
|
||||
|
||||
public class LeaderboardCreatorConfig : ScriptableObject
|
||||
{
|
||||
public AuthSaveMode authSaveMode = AuthSaveMode.PlayerPrefs;
|
||||
public string fileName = "leaderboard-creator-guid.txt";
|
||||
public bool isUpdateLogsEnabled = true;
|
||||
|
||||
public TextAsset leaderboardsFile;
|
||||
#if UNITY_EDITOR
|
||||
public TextAsset editorOnlyLeaderboardsFile;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
3
Assets/LeaderboardCreator/Scripts/Utils/LeaderboardCreatorConfig.cs.meta
Executable file
3
Assets/LeaderboardCreator/Scripts/Utils/LeaderboardCreatorConfig.cs.meta
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f004774a7efa44eab4c0e289b68f484f
|
||||
timeCreated: 1693951769
|
||||
23
Assets/LeaderboardCreator/Scripts/Utils/Requests.cs
Executable file
23
Assets/LeaderboardCreator/Scripts/Utils/Requests.cs
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace Dan
|
||||
{
|
||||
internal static partial class Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a form section and adds the parameters to it.
|
||||
/// </summary>
|
||||
/// <returns>IMultipartFormSection object</returns>
|
||||
public static IMultipartFormSection Field(string fieldName, string data) =>
|
||||
new MultipartFormDataSection(fieldName, data);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a form out of the given parameters.
|
||||
/// </summary>
|
||||
/// <param name="formDataSections"></param>
|
||||
/// <returns>A list of IMultipartFormSection objects</returns>
|
||||
public static List<IMultipartFormSection> Form(params IMultipartFormSection[] formDataSections) =>
|
||||
new List<IMultipartFormSection>(formDataSections);
|
||||
}
|
||||
}
|
||||
3
Assets/LeaderboardCreator/Scripts/Utils/Requests.cs.meta
Executable file
3
Assets/LeaderboardCreator/Scripts/Utils/Requests.cs.meta
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 82185ae765074638b9962f5fbb356776
|
||||
timeCreated: 1651554086
|
||||
Loading…
Add table
Add a link
Reference in a new issue