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.
CrowdControl/Assets/Source/Scripts/SO/Upgrades/Member Upgrades/MemberUpgrades.cs

27 lines
888 B
C#

2 months ago
using System;
using System.Collections.Generic;
using Unity.VisualScripting;
2 months ago
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;
} }
2 months ago
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];
}
2 months ago
}