38 lines
1019 B
C#
38 lines
1019 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TalentListController : MonoBehaviour
|
|
{
|
|
[SerializeField] List<TalentTabController> talentTabs;
|
|
|
|
void updateTab(int tabIndex, bool active) {
|
|
if (tabIndex < 0 || tabIndex > talentTabs.Count) {
|
|
return;
|
|
}
|
|
if (GameData.IsPlayerUnlocked((Employee)tabIndex)) {
|
|
talentTabs[tabIndex].setPanelActive(active);
|
|
}
|
|
}
|
|
|
|
public void setActiveTab(int tabIndex) {
|
|
for (int i = 0; i < talentTabs.Count; i++) {
|
|
updateTab(i, i == tabIndex);
|
|
}
|
|
}
|
|
|
|
// Start is called before the first frame update
|
|
void Start() {
|
|
Debug.Log("TODO: Load a specific set in demo mode regardless of unlock status");
|
|
for (int i = 0; i < talentTabs.Count; i++) {
|
|
talentTabs[i].gameObject.SetActive(GameData.IsPlayerUnlocked((Employee)i));
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|