public void SetSynergyInfo(Tribe tribe)
    {
        var tribeDataSheet = DataBase.Instance.tribeDataSheet;

        if (tribeDataSheet.TryGetTribeData(tribe, out var tribeData))
        {
            SetSynergyImage(tribeData.Image);
            SetSynergyNameText(SynergyService.GetNameByTribe(tribeData.Tribe));
            SetSynergyInfoText(tribeData.Description);
        }

        var characterDataSheet = DataBase.Instance.characterDataSheet;
        var characterDataList  = characterDataSheet.GetCharacterDataListByTribe(tribe);
        int index = 0;

        foreach (var characterData in characterDataList)
        {
            characterImageList[index].SetCharacterImage(characterData.Image);
            characterImageList[index].Disabled();

            var characterList = InGameManager.instance.draggableCentral.uiCharacterArea.GetCharacterList();
            foreach (var character in characterList)
            {
                if (character.characterInfo.id == characterData.Id)
                {
                    characterImageList[index].Activate();
                    break;
                }
            }

            characterImageList[index].OnShow();

            ++index;
        }

        for (int i = index; i < characterImageList.Count; ++i)
        {
            characterImageList[i].OnHide();
        }
    }
示例#2
0
    public void SetOriginText(Origin origin)
    {
        var originStr = SynergyService.GetNameByOrigin(origin);

        originText.text = originStr;
    }
示例#3
0
    public void SetTribeText(Tribe tribe)
    {
        var tribeStr = SynergyService.GetNameByTribe(tribe);

        tribeText.text = tribeStr;
    }