You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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<GameObject> 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];
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|