add project files
This commit is contained in:
@@ -0,0 +1,226 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using OHM.UnityToolkit;
|
||||
using OHM.UnityToolkit.Inventory;
|
||||
|
||||
public class AppController : MonoBehaviour
|
||||
{
|
||||
public class TransformEvent : UnityEvent<Transform>
|
||||
{
|
||||
}
|
||||
|
||||
public const string EDITOR_NAME = "GameSqueleton";
|
||||
|
||||
public CoreController coreGame;
|
||||
|
||||
public SavedDataController savedDataController;
|
||||
|
||||
public MetaDef metaDef;
|
||||
|
||||
[HideInInspector]
|
||||
public UnityEvent onGameExited;
|
||||
|
||||
[HideInInspector]
|
||||
public UnityEvent onCurrenciesChanged;
|
||||
|
||||
[HideInInspector]
|
||||
public UnityEvent onLevelChanged;
|
||||
|
||||
[HideInInspector]
|
||||
public UnityEvent onLevelCleared;
|
||||
|
||||
[HideInInspector]
|
||||
public UnityEvent onBestScoreChanged;
|
||||
|
||||
[NonSerialized]
|
||||
public bool needRestart;
|
||||
|
||||
public System.Random random = new System.Random();
|
||||
|
||||
private CustomizableController<PlayerSkinDef, PlayerSkinData> _playerSkinController;
|
||||
|
||||
private CustomizableController<PickupsSkinDef, PickupsSkinData> _pickupsSkinsController;
|
||||
|
||||
public CustomizableController<PlayerSkinDef, PlayerSkinData> PlayerSkinController =>
|
||||
_playerSkinController ?? (_playerSkinController = new PlayerSkinController(this));
|
||||
|
||||
public CustomizableController<PickupsSkinDef, PickupsSkinData> PickupsSkinsController =>
|
||||
_pickupsSkinsController ?? (_pickupsSkinsController = new PickupsSkinsController(this));
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
Application.targetFrameRate = 60;
|
||||
Physics.autoSyncTransforms = false;
|
||||
coreGame.onGameStarted.AddListener(OnGameStarted);
|
||||
coreGame.onGameOver.AddListener(OnGameOver);
|
||||
coreGame.onGameWon.AddListener(OnGameEnded);
|
||||
coreGame.currenciesController.onWinCurrencies += OnWinCurrency;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
AppSettings.Instance.Apply();
|
||||
Quit();
|
||||
}
|
||||
|
||||
internal void StartWaitForReadyThen(Action p)
|
||||
{
|
||||
StartCoroutine(WaitForReadyThen(p));
|
||||
}
|
||||
|
||||
private IEnumerator WaitForReadyThen(Action action)
|
||||
{
|
||||
while (!coreGame.IsReadyToPlay())
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
action();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Application.isEditor && Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
needRestart = true;
|
||||
}
|
||||
if (needRestart)
|
||||
{
|
||||
Restart();
|
||||
needRestart = false;
|
||||
}
|
||||
if (Application.isEditor && Input.GetKeyDown(KeyCode.Q))
|
||||
{
|
||||
Quit();
|
||||
}
|
||||
if (Application.isEditor && Input.GetKeyDown(KeyCode.U))
|
||||
{
|
||||
DebugNextLevel();
|
||||
}
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
Quit();
|
||||
coreGame.Go();
|
||||
}
|
||||
|
||||
public void Quit()
|
||||
{
|
||||
onGameExited.Invoke();
|
||||
PlayerSkinController.ApplyCurrent();
|
||||
PickupsSkinsController.ApplyCurrent();
|
||||
coreGame.Warmup(GetPlayerLevel());
|
||||
}
|
||||
|
||||
public void Go()
|
||||
{
|
||||
coreGame.Go();
|
||||
}
|
||||
|
||||
private void OnGameStarted()
|
||||
{
|
||||
}
|
||||
|
||||
private void OnGameEnded()
|
||||
{
|
||||
savedDataController.SavedData.inventory.AddReward(SavedDataTUType.LEVEL_IDX, 1L);
|
||||
RegisterBestScore();
|
||||
savedDataController.SaveData();
|
||||
onLevelCleared.Invoke();
|
||||
}
|
||||
|
||||
private void OnGameOver()
|
||||
{
|
||||
RegisterBestScore();
|
||||
}
|
||||
|
||||
private void RegisterBestScore()
|
||||
{
|
||||
long score = coreGame.scoreController.Score;
|
||||
if (score <= GetBestScore())
|
||||
{
|
||||
return;
|
||||
}
|
||||
savedDataController.SavedData.inventory.SetCount(SavedDataTUType.BEST_SCORE_DEFAULT, score);
|
||||
savedDataController.SaveData();
|
||||
onBestScoreChanged.Invoke();
|
||||
}
|
||||
|
||||
public long GetBestScore()
|
||||
{
|
||||
return savedDataController.SavedData.inventory.GetCount(SavedDataTUType.BEST_SCORE_DEFAULT);
|
||||
}
|
||||
|
||||
public long GetPlayerLevel()
|
||||
{
|
||||
return savedDataController.SavedData.inventory.GetCount(SavedDataTUType.LEVEL_IDX);
|
||||
}
|
||||
|
||||
private void OnWinCurrency(int count, Transform fromObj)
|
||||
{
|
||||
WinCurrencies(count);
|
||||
}
|
||||
|
||||
public void WinCurrencies(int count)
|
||||
{
|
||||
savedDataController.SavedData.inventory.AddReward(SavedDataTUType.CURRENCY, count);
|
||||
savedDataController.SaveData();
|
||||
onCurrenciesChanged.Invoke();
|
||||
}
|
||||
|
||||
public long GetCurrencies()
|
||||
{
|
||||
return savedDataController.SavedData.inventory.GetCount(SavedDataTUType.CURRENCY);
|
||||
}
|
||||
|
||||
public bool CanPayCost(TransactionUnit<SavedDataTUType> cost)
|
||||
{
|
||||
return savedDataController.SavedData.inventory.HasCost(cost);
|
||||
}
|
||||
|
||||
public bool TryPayCost(TransactionUnit<SavedDataTUType> cost)
|
||||
{
|
||||
if (!savedDataController.SavedData.inventory.PayCost(cost))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
onCurrenciesChanged.Invoke();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void ResetData(bool exit)
|
||||
{
|
||||
PlayerPrefs.DeleteAll();
|
||||
savedDataController.ClearData();
|
||||
savedDataController.ResetData();
|
||||
AppSettings.Instance.Apply();
|
||||
if (exit)
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
|
||||
public void DebugNextLevel()
|
||||
{
|
||||
savedDataController.SavedData.inventory.AddReward(SavedDataTUType.LEVEL_IDX, 1L);
|
||||
savedDataController.SaveData();
|
||||
onLevelChanged.Invoke();
|
||||
}
|
||||
|
||||
public void DebugRich()
|
||||
{
|
||||
savedDataController.SavedData.inventory.AddReward(SavedDataTUType.CURRENCY, 1000L);
|
||||
savedDataController.SaveData();
|
||||
onCurrenciesChanged.Invoke();
|
||||
}
|
||||
|
||||
public void DebugPoor()
|
||||
{
|
||||
savedDataController.SavedData.inventory.SetCount(SavedDataTUType.CURRENCY, 0L);
|
||||
savedDataController.SaveData();
|
||||
onCurrenciesChanged.Invoke();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a710c174a0bc287722435666d08f6730
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
using UnityEngine;
|
||||
using OHM.UnityToolkit;
|
||||
using OHM.UnityToolkit.Vibration;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class AppSettings : UniqueInstance<AppSettings>
|
||||
{
|
||||
[SerializeField]
|
||||
public SavedDataController savedDataController;
|
||||
|
||||
[SerializeField]
|
||||
[FormerlySerializedAs("audioManager")]
|
||||
private AudioManager _audioManager;
|
||||
|
||||
public bool VibrationsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return savedDataController.SavedData.vibrationEnabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
VibrationManager.Enabled = value;
|
||||
savedDataController.SavedData.vibrationEnabled = value;
|
||||
savedDataController.SaveData();
|
||||
}
|
||||
}
|
||||
|
||||
public bool AudioEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return savedDataController.SavedData.soundEnabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_audioManager != null)
|
||||
{
|
||||
_audioManager.SetMasterEnabled(value);
|
||||
_audioManager.SetSFXEnabled(value);
|
||||
_audioManager.SetMusicEnabled(value);
|
||||
}
|
||||
savedDataController.SavedData.soundEnabled = value;
|
||||
savedDataController.SaveData();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void AwakeInstance()
|
||||
{
|
||||
Apply();
|
||||
}
|
||||
|
||||
public void Apply()
|
||||
{
|
||||
VibrationManager.Enabled = VibrationsEnabled;
|
||||
if (_audioManager != null)
|
||||
{
|
||||
_audioManager.Setup(AudioEnabled, AudioEnabled, AudioEnabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e1965773f4417a337adfe3c71eb7c4b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
|
||||
public interface IInputsListener
|
||||
{
|
||||
void InputDown(Vector3 screenPosition);
|
||||
|
||||
void InputMove(Vector3 screenPosition);
|
||||
|
||||
void InputUp();
|
||||
|
||||
void InputCancel();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb496d472f2721c5cb62496134912126
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,100 @@
|
||||
using UnityEngine;
|
||||
using OHM.UnityToolkit;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class InputController : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
[FormerlySerializedAs("core")]
|
||||
private CoreController _core;
|
||||
|
||||
private bool _downValid;
|
||||
|
||||
private Vector2 GetTouchPos()
|
||||
{
|
||||
if (Input.touchCount >= 1)
|
||||
{
|
||||
return Input.GetTouch(0).position;
|
||||
}
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
|
||||
return Input.mousePosition;
|
||||
#else
|
||||
return Vector2.zero;
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool TouchDown()
|
||||
{
|
||||
if (Input.touchCount >= 1)
|
||||
{
|
||||
return Input.GetTouch(0).phase == TouchPhase.Began;
|
||||
}
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
return Input.GetMouseButtonDown(0);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool TouchHold()
|
||||
{
|
||||
if (Input.touchCount >= 1)
|
||||
{
|
||||
TouchPhase phase = Input.GetTouch(0).phase;
|
||||
return phase == TouchPhase.Moved || phase == TouchPhase.Stationary;
|
||||
}
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
return Input.GetMouseButton(0);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool TouchUp()
|
||||
{
|
||||
if (Input.touchCount >= 1)
|
||||
{
|
||||
return Input.GetTouch(0).phase == TouchPhase.Ended;
|
||||
}
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
return Input.GetMouseButtonUp(0);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
Vector2 touchPos = GetTouchPos();
|
||||
if (!UIUtils.IsInputBlocked(touchPos) && TouchDown())
|
||||
{
|
||||
IInputsListener listener = _core.GetCurrentInputsListener();
|
||||
if (listener != null)
|
||||
{
|
||||
listener.InputDown(touchPos);
|
||||
}
|
||||
_downValid = true;
|
||||
}
|
||||
else if (_downValid)
|
||||
{
|
||||
if (TouchHold())
|
||||
{
|
||||
IInputsListener listener2 = _core.GetCurrentInputsListener();
|
||||
if (listener2 != null)
|
||||
{
|
||||
listener2.InputMove(touchPos);
|
||||
}
|
||||
}
|
||||
else if (TouchUp())
|
||||
{
|
||||
_downValid = false;
|
||||
IInputsListener listener3 = _core.GetCurrentInputsListener();
|
||||
if (listener3 != null)
|
||||
{
|
||||
listener3.InputUp();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83511812700fa5861115d5ce6f3a28e2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using OHM.UnityToolkit;
|
||||
|
||||
public class PerformanceManager : UniqueInstance<PerformanceManager>
|
||||
{
|
||||
public enum QualityLevelType
|
||||
{
|
||||
AUTO = 0,
|
||||
MANUAL = 1
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class QualityLevel
|
||||
{
|
||||
public int engineQualityLevel;
|
||||
|
||||
public float fixedTimeStep = 0.01f;
|
||||
}
|
||||
|
||||
public List<QualityLevel> qualityLevels;
|
||||
|
||||
private AppController _app;
|
||||
|
||||
public float refreshRate = 1f;
|
||||
public float criticalFpsThreashold;
|
||||
|
||||
public float lowerQualityCriticalCount = 5f;
|
||||
private int _frameCount;
|
||||
|
||||
private float _timeAccum;
|
||||
|
||||
private int _criticalCount;
|
||||
|
||||
public int QualityIndex { get; private set; } = -1;
|
||||
|
||||
public QualityLevelType LevelType { get; private set; }
|
||||
|
||||
public bool RecordPerformances { get; private set; }
|
||||
|
||||
public float LastAverageFps { get; set; } = 60f;
|
||||
|
||||
public event Action OnQualityChange;
|
||||
|
||||
public event Action OnRecordingChange;
|
||||
|
||||
protected override void AwakeInstance()
|
||||
{
|
||||
base.AwakeInstance();
|
||||
LevelType = QualityLevelType.AUTO;
|
||||
if (qualityLevels != null && qualityLevels.Count > 0)
|
||||
{
|
||||
ApplyQuality(qualityLevels.Count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_app = GetComponentInParent<AppController>();
|
||||
if (_app == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_app.coreGame.onGameStarted.AddListener(StartRecord);
|
||||
_app.coreGame.onGameOver.AddListener(StopRecord);
|
||||
}
|
||||
|
||||
private void StopRecord()
|
||||
{
|
||||
SetRecordPerformances(record: false);
|
||||
_criticalCount = 0;
|
||||
}
|
||||
|
||||
private void StartRecord()
|
||||
{
|
||||
SetRecordPerformances(record: true);
|
||||
}
|
||||
|
||||
private void ApplyQuality(int index)
|
||||
{
|
||||
if (QualityIndex == index)
|
||||
{
|
||||
return;
|
||||
}
|
||||
QualityIndex = index;
|
||||
QualityLevel level = qualityLevels[index];
|
||||
Time.fixedDeltaTime = level.fixedTimeStep;
|
||||
QualitySettings.SetQualityLevel(level.engineQualityLevel, applyExpensiveChanges: true);
|
||||
if (this.OnQualityChange != null)
|
||||
{
|
||||
this.OnQualityChange();
|
||||
}
|
||||
}
|
||||
|
||||
public void ForceQuality(int index)
|
||||
{
|
||||
LevelType = QualityLevelType.MANUAL;
|
||||
ApplyQuality(index);
|
||||
}
|
||||
|
||||
public void SetAutoQuality()
|
||||
{
|
||||
LevelType = QualityLevelType.AUTO;
|
||||
if (qualityLevels != null && qualityLevels.Count > 0)
|
||||
{
|
||||
ApplyQuality(qualityLevels.Count - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
UpdatePerformances();
|
||||
}
|
||||
|
||||
public void SetRecordPerformances(bool record)
|
||||
{
|
||||
RecordPerformances = record;
|
||||
if (this.OnRecordingChange != null)
|
||||
{
|
||||
this.OnRecordingChange();
|
||||
}
|
||||
_criticalCount = 0;
|
||||
}
|
||||
|
||||
private void UpdatePerformances()
|
||||
{
|
||||
if (!RecordPerformances || LevelType != QualityLevelType.AUTO)
|
||||
{
|
||||
_criticalCount = 0;
|
||||
return;
|
||||
}
|
||||
if (QualityIndex < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_frameCount++;
|
||||
_timeAccum += Time.unscaledDeltaTime;
|
||||
if (_timeAccum <= refreshRate)
|
||||
{
|
||||
return;
|
||||
}
|
||||
LastAverageFps = _frameCount / _timeAccum;
|
||||
OnNewPerfValue();
|
||||
}
|
||||
|
||||
private void OnNewPerfValue()
|
||||
{
|
||||
_frameCount = 0;
|
||||
_timeAccum = 0f;
|
||||
if (LastAverageFps >= criticalFpsThreashold)
|
||||
{
|
||||
_criticalCount = 0;
|
||||
return;
|
||||
}
|
||||
_criticalCount++;
|
||||
if (_criticalCount >= lowerQualityCriticalCount)
|
||||
{
|
||||
LowerQuality();
|
||||
_criticalCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void LowerQuality()
|
||||
{
|
||||
int index = QualityIndex - 1;
|
||||
ApplyQuality(index);
|
||||
Debug.Log("Lowering quality to " + index);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f72d7a86f8e495336fc2d02def50c0c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class SavedData
|
||||
{
|
||||
[SerializeField]
|
||||
public SavedDataInventory inventory = new SavedDataInventory();
|
||||
[SerializeField]
|
||||
public PlayerSkinsData playerSkins = new PlayerSkinsData();
|
||||
[SerializeField]
|
||||
public PickupsSkinsData pickupsSkins = new PickupsSkinsData();
|
||||
|
||||
public bool firstOpen = true;
|
||||
[SerializeField]
|
||||
public bool vibrationEnabled = true;
|
||||
[SerializeField]
|
||||
public bool soundEnabled;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 880ef53af3dba79814b3821cefc53490
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
using OHM.UnityToolkit;
|
||||
|
||||
public class SavedDataController : SavedDataController<SavedData>
|
||||
{
|
||||
protected override void FillInitialData(SavedData initialData)
|
||||
{
|
||||
initialData.soundEnabled = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a91622bd5b3585cef772d7762cfccee4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
using OHM.UnityToolkit.Inventory;
|
||||
|
||||
[Serializable]
|
||||
public class SavedDataInventory : Inventory<SavedDataTUType>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c94542420f9390e4da5b0a51d45f8038
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
[Serializable]
|
||||
public enum SavedDataTUCategory
|
||||
{
|
||||
CURRENCY = 0,
|
||||
SKIN = 1,
|
||||
NO_AD = 2,
|
||||
BEST_SCORE_DEFAULT = 10,
|
||||
PLAYER_LEVEL = 11
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d86b549d14c3cf4c89483c9a94c378c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using OHM.UnityToolkit.Inventory;
|
||||
|
||||
[Serializable]
|
||||
public class SavedDataTUType : TUTypeStrId<SavedDataTUCategory>
|
||||
{
|
||||
public static SavedDataTUType CURRENCY = new SavedDataTUType(SavedDataTUCategory.CURRENCY);
|
||||
|
||||
public static SavedDataTUType BEST_SCORE_DEFAULT = new SavedDataTUType(SavedDataTUCategory.BEST_SCORE_DEFAULT);
|
||||
|
||||
public static SavedDataTUType NO_AD = new SavedDataTUType(SavedDataTUCategory.NO_AD);
|
||||
|
||||
public static SavedDataTUType LEVEL_IDX = new SavedDataTUType(SavedDataTUCategory.PLAYER_LEVEL);
|
||||
|
||||
public SavedDataTUType(SavedDataTUCategory category, string id = "")
|
||||
: base(category, id)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1268e1cb3e9ecc343a8974227d8dfd8b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user