public void Show()
    {
        if (mBoard == null)
        {
            return;
        }
        switch (mOwner.Type)
        {
        case EActorType.PLAYER:
        {
            mBoard.SetVisable(true);
            string text1 = GTTools.Format("<#00ff35>Lv.{0} {1}</color>", mOwner.Level, mOwner.Name);
            string text2 = GTTools.Format("<#00ff35><{0}></color>", "单身狗");
            mBoard.Show(text1, text2, 1);
        }
        break;

        case EActorType.NPC:
        {
            mBoard.SetVisable(false);
            string text1 = GTTools.Format("<#0000ff>{0}</color>", mOwner.Name);
            string text2 = GTTools.Format("<#0000ff><{0}></color>", "魔教");
            mBoard.Show(text1, text2);
        }
        break;

        case EActorType.MONSTER:
        {
            mBoard.SetVisable(false);
            string text1 = GTTools.Format("<#ff0000>{0}</color>", mOwner.Name);
            string text2 = null;
            mBoard.Show(text1, text2);
        }
        break;
        }
    }
Exemple #2
0
    public HUDBoard Create(IEntiny entiny)
    {
        HUDBoard window = null;

        mBoards.TryGetValue(entiny, out window);
        if (window == null)
        {
            GameObject go = GTPoolManager.Instance.GetObject(GTPrefabKey.PRE_UIBOARD);
            window = go.GET <HUDBoard>();
        }
        window.SetTarget(entiny.CacheTransform);
        window.SetPath(GTPrefabKey.PRE_UIBOARD);
        window.SetVisable(false);
        mBoards.Add(entiny, window);
        return(window);
    }