Beispiel #1
0
    public override void UpdateUI()
    {
        lobby.SetActive(petType == LobbyUISystem.RoomType.Lobby);
        roof.SetActive(petType == LobbyUISystem.RoomType.Roof);
        room.SetActive(petType == LobbyUISystem.RoomType.Room);

        if (petType == LobbyUISystem.RoomType.Room)
        {
            if (animData == null)
            {
                Debug.Log("something is wrong");
                return;
            }

            string image = "";
            if (animData.TryGetImage(getAnimationIdxFunc(idx), ref image))
            {
                characterImage.spriteName = image;
            }

            if (petData == null)
            {
                return;
            }

            if (petData.CanActiveSkillUpgrade())
            {
                newIcon.SetActive(true);
            }
            else if (petData.CanPassiveSkillUpgrade())
            {
                newIcon.SetActive(true);
            }
            else
            {
                newIcon.SetActive(false);
            }
        }
    }
Beispiel #2
0
 public bool TryGetImage(int idx, ref string image)
 {
     return(animTable.TryGetImage(idx, ref image));
 }