protected override void LoadDataInternal()
    {
        base.LoadDataInternal();
        Init();

        heroData = Main.GameState.GetHeroData(characterSlotID);

        if (heroData != null)
        {
            playerIcon.gameObject.SetActive(true);
            teleportIcon.gameObject.SetActive(true);
            newHeroIcon.gameObject.SetActive(false);

            playerIcon.sprite   = PlayerGraphics.GetPlayerIcon(heroData);
            teleportIcon.sprite = PlayerGraphics.GetTeleportIcon(heroData);

            characterName.text = heroData.CharacterName;
            characterLvl.text  = "Lvl " + heroData.Level.ToString();
        }
        else
        {
            playerIcon.gameObject.SetActive(false);
            teleportIcon.gameObject.SetActive(false);
            newHeroIcon.gameObject.SetActive(true);

            characterName.text = "Empty";
            characterLvl.text  = "";
        }
    }
예제 #2
0
    public override void LoadDataInternal()
    {
        if (playerData != null)
        {
            playerIcon.sprite   = PlayerGraphics.GetPlayerIcon(playerData);
            teleportIcon.sprite = PlayerGraphics.GetTeleportIcon(playerData);

            characterName.text = playerData.CharacterName;
            characterLvl.text  = "Lvl " + playerData.Level.ToString();

            if (characterSlotID == MainData.CurrentSaveData.CurrentSlotID)
            {
                SetActive();
            }
            else
            {
                SetInactive();
            }
        }
    }