using System; using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; [CreateAssetMenu(menuName = "Game/Upgrades/Member Upgrade")] public class MemberUpgrades : Upgrades { [SerializeField] private GameObject memberPrefab; [SerializeField] private Sprite silhouetteIcon; public List characters; public GameObject MemberPrefab { get { memberPrefab = GetCurrentCharacter(); return memberPrefab; } } public override UpgradesType GetUpgradeType() => UpgradesType.Member; public Sprite SilhouetteIcon => silhouetteIcon; private GameObject GetCurrentCharacter() { int currentCharacterIndex = PlayerPrefs.GetInt(Constants.PlayerSelectionKey, 0); Debug.Log("Characted Selection ID: " + currentCharacterIndex); return characters[currentCharacterIndex]; } }