UI HUGE UPDATE
This commit is contained in:
@@ -232,6 +232,11 @@ public class teamSettingPanel : MonoBehaviour
|
||||
List<CharacterView> selectAbleCharacters = teamManager.SelectableCharacterList;
|
||||
foreach (CharacterView c in selectAbleCharacters) //id and level
|
||||
{
|
||||
if (!IsCharacterUnlocked(c != null ? c.characterId : 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
GameObject characterObj = Instantiate(teamCharacterPrefab, teamCharacterViewContent.transform);
|
||||
CharacterCardView ccv = characterObj.GetComponent<CharacterCardView>();
|
||||
TeamCharacterDataInfo tcdi = getCharacterViewInfo(c.characterId);
|
||||
@@ -251,6 +256,27 @@ public class teamSettingPanel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsCharacterUnlocked(int characterID)
|
||||
{
|
||||
if (characterID <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
AllyHero_SO[] heroes = Resources.LoadAll<AllyHero_SO>("");
|
||||
for (int i = 0; i < heroes.Length; i++)
|
||||
{
|
||||
AllyHero_SO hero = heroes[i];
|
||||
if (hero != null && hero.ally_heroID == characterID)
|
||||
{
|
||||
return hero.isUnlocked;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool checkExistenceStatus(List<CharacterView> currentTeam,int characterID)
|
||||
{
|
||||
foreach (CharacterView c in currentTeam)
|
||||
|
||||
Reference in New Issue
Block a user