36 lines
814 B
C#
36 lines
814 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AbilitySceneTransfer : MonoBehaviour
|
|
{
|
|
#region Statication
|
|
|
|
public static AbilitySceneTransfer instance;
|
|
|
|
private void Awake()
|
|
{
|
|
if (instance != null && instance != this)
|
|
{
|
|
Destroy(gameObject);
|
|
return;
|
|
}
|
|
instance = this;
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
|
|
#endregion
|
|
[System.Serializable]
|
|
public class SavedAbility
|
|
{
|
|
public string abilityName;
|
|
public Dictionary<string, int> equippedUpgrades;
|
|
}
|
|
public List<SavedAbility> savedAbilities;
|
|
public void SaveAbility(PlayerAbility savedAbility)
|
|
{
|
|
savedAbilities.Add(new SavedAbility
|
|
{
|
|
abilityName = savedAbility.abilityName
|
|
});
|
|
}
|
|
}
|