Example #1
0
 public static void SetLanguage(this TextEx text, int id)
 {
     if (text != null)
     {
         text.SetText(Language.Get(id));
     }
 }
Example #2
0
    void UpdateRedpoint(RedPointState state, int count)
    {
        if (m_Simple != null)
        {
            m_Simple.gameObject.SetActive(state == RedPointState.Simple);
        }

        if (m_Count != null)
        {
            m_Count.gameObject.SetActive(state == RedPointState.Count);
        }

        if (m_CountText != null)
        {
            m_CountText.gameObject.SetActive(state == RedPointState.Count);
            if (state == RedPointState.Count)
            {
                m_CountText.SetText(count > 9 ? "N" : count >= 1 ? count.ToString() : "");
            }
        }

        if (m_Full != null)
        {
            m_Full.gameObject.SetActive(state == RedPointState.Full);
        }
    }
Example #3
0
 public static void SetText(this TextEx text, object @object)
 {
     if (text != null)
     {
         text.SetText(@object.ToString());
     }
 }
Example #4
0
    public HeadUpName Display(string name, string title, int level)
    {
        if (string.IsNullOrEmpty(name))
        {
            m_NameBehaviour.SetActive(false);
        }
        else
        {
            m_NameBehaviour.SetActive(true);
            m_NameBehaviour.SetText(name);
        }

        if (string.IsNullOrEmpty(title))
        {
            m_TitleBehaviour.SetActive(false);
        }
        else
        {
            m_TitleBehaviour.SetActive(true);
            m_TitleBehaviour.SetText(title);
        }

        if (level <= 0)
        {
            m_LevelBehaviour.SetActive(false);
        }
        else
        {
            m_LevelBehaviour.SetActive(true);
            m_LevelBehaviour.SetText(level);
        }

        return(this);
    }
Example #5
0
    private void DisplayBaseInfo()
    {
        var config = WorldBossConfig.Get(bossBrief.bossId);

        m_BossName.SetText(config.name);
        m_Level.SetText(config.level);
        m_Icon.SetSprite(config.icon);
    }
Example #6
0
    private void DisplayKillTimes()
    {
        var killTimes  = WorldBoss.Instance.killedTimes.Fetch();
        var totalTimes = WorldBoss.Instance.totalTimes.Fetch();

        m_KillTimes.SetText(StringUtil.Contact(killTimes, "/", totalTimes));
        m_KillTimes.SetColor(killTimes >= totalTimes ? ColorUtil.red : ColorUtil.green);
    }
Example #7
0
    private void DisplayBaseInfo()
    {
        var config = NpcConfig.Get(bossId);

        m_BossName.SetText(config.name);
        m_BossLevel.SetText(config.level);

        var worldBossConfig = WorldBossConfig.Get(bossId);

        m_BossDescription.SetLanguage(worldBossConfig.name);
    }
Example #8
0
    private void DisplayCountDown()
    {
        if (SkillCast.Instance.IsCountDown(this.m_Index))
        {
            m_CoolDownContainer.SetActive(true);
            m_CoolDownNumber.SetText(SkillCast.Instance.GetSkillCountDown(this.m_Index));

            var amount = SkillCast.Instance.GetSkillCountDownAmount(this.m_Index);
            m_CoolDownCircle.fillAmount = amount;
        }
        else
        {
            m_CoolDownContainer.SetActive(false);
        }
    }
Example #9
0
    public void DisplaySurplusTimes(int dungeonId)
    {
        var config       = DungeonConfig.Get(dungeonId);
        var surplusTimes = 0;

        if (config.dailyTimes > 0)
        {
            surplusTimes = Dungeon.Instance.GetDailySurplusTimes(dungeonId);
        }
        else
        {
            surplusTimes = Dungeon.Instance.GetWeekSurplusTimes(dungeonId);
        }
        m_SurplusTimes.SetText(surplusTimes);
    }
Example #10
0
    private void DisplayBaseInfo(int dungeonId)
    {
        var config = DungeonConfig.Get(dungeonId);

        m_DungeonName.SetLanguage(config.name);
        m_Introduce.SetLanguage(config.description);
        m_TimeLimit.SetText(config.timeLimit);
        m_RecommenLevel.SetText(StringUtil.Contact(config.recommendLevel.x, "--", config.recommendLevel.y));

        var items = new List <Item>();

        foreach (var reward in config.rewards)
        {
            items.Add(new Item()
            {
                id    = reward.x,
                count = reward.y
            });
        }

        m_Rewards.Display(items);
    }
Example #11
0
 private void DisplayTips()
 {
     m_Tips.SetText(Language.GetLocal(LaunchPresenter.Instance.randowTips.Fetch()));
 }
Example #12
0
 public HeadUpGuild Display(string name)
 {
     m_GuildName.SetText(name);
     return(this);
 }