Exemple #1
0
        //------------------------------------------------------------
        // CController.CreateTextParser
        //
        /// <summary>Create a CTextParser instance.</summary>
        /// <returns>作成した CTextParser インスタンス。</returns>
        /// <remarks>
        /// STDMETHODIMP CController::CreateParser (ICSParser **ppParser)
        /// ICSParser is implermented only by CTextParser.
        /// </remarks>
        //------------------------------------------------------------
        virtual internal CTextParser CreateTextParser()
        {
            CTextParser parser = new CTextParser();

            parser.Initialize(this, this.OptionManager.LangVersion);
            return(parser);
        }
    public void Add(string Message, SYSTEM_MESSAGE_TYPE MessageType, string strColor)
    {
        Main_UI_SystemMessage.cMessage cMessage = new Main_UI_SystemMessage.cMessage();
        CTextParser instance = NrTSingleton <CTextParser> .Instance;

        if (this.m_TextList.Count == 3)
        {
            Box box = (Box)this.m_TextList[0].m_LinkControl;
            box.Text = string.Empty;
            this.m_TextList.RemoveAt(0);
        }
        for (int i = 0; i < 3; i++)
        {
            if (this.m_bxData[i].Text == string.Empty)
            {
                string @string = NrTSingleton <UIDataManager> .Instance.GetString(instance.GetTextColor(strColor), Message);

                this.m_bxData[i].Text = @string;
                float num = this.m_bxData[i].spriteText.TotalWidth + 20f;
                this.m_bxData[i].SetSize(num, 38f);
                this.m_bxData[i].Text = @string;
                this.m_bxData[i].SetLocation(GUICamera.width / 2f - num / 2f, (float)((int)(GUICamera.height * 0.3f)));
                this.m_bxData[i].Visible    = true;
                this.m_bxData[i].AlphaValue = 1f;
                this.m_bxData[i].Text       = @string;
                cMessage.m_LinkControl      = this.m_bxData[i];
                break;
            }
        }
        if (cMessage.m_LinkControl != null)
        {
            if (this.m_TextList.Count == 1)
            {
                Box box2 = (Box)this.m_TextList[0].m_LinkControl;
                if (Time.time - this.m_TextList[0].m_fStartTime < 2f)
                {
                    box2.SetLocation(box2.GetLocation().x, box2.GetLocationY() - 38f);
                    this.m_TextList[0].m_fStartTime = Time.time - 2f;
                    this.m_TextList[0].m_fStepTime  = Time.time - 0.2f;
                    box2.AlphaValue = 0.6f;
                }
            }
            else if (this.m_TextList.Count == 2)
            {
                Box box3 = (Box)this.m_TextList[0].m_LinkControl;
                box3.SetLocation(box3.GetLocation().x, (float)((int)(GUICamera.height * 0.3f) - 76));
                this.m_TextList[0].m_fStartTime = Time.time - 4.1f;
                this.m_TextList[0].m_fStepTime  = Time.time - 0.2f;
                box3.AlphaValue = 0.3f;
                Box box4 = (Box)this.m_TextList[1].m_LinkControl;
                box4.SetLocation(box4.GetLocation().x, (float)((int)(GUICamera.height * 0.3f) - 38));
                this.m_TextList[1].m_fStartTime = Time.time - 2.1f;
                this.m_TextList[1].m_fStepTime  = Time.time - 0.2f;
                box4.AlphaValue = 0.6f;
            }
            cMessage.m_fStartTime = Time.time;
            cMessage.m_fStepTime  = Time.time;
            this.m_TextList.Add(cMessage);
        }
    }
    private string GetColor(SYSTEM_MESSAGE_TYPE type)
    {
        CTextParser instance = NrTSingleton <CTextParser> .Instance;
        string      result   = instance.GetBaseColor();

        switch (type)
        {
        case SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE:
            result = instance.GetTextColor("1107");
            break;

        case SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE:
            result = instance.GetTextColor("1305");
            break;

        case SYSTEM_MESSAGE_TYPE.CAUTION_MESSAGE:
            result = instance.GetTextColor("1106");
            break;

        case SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE:
            result = instance.GetTextColor("1302");
            break;

        case SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE:
            result = instance.GetTextColor("1105");
            break;

        case SYSTEM_MESSAGE_TYPE.ADMIN_SYSTEM_MESSAGE:
            result = instance.GetTextColor("1306");
            break;

        case SYSTEM_MESSAGE_TYPE.QUEST_COMLPETE:
            result = instance.GetTextColor("1105");
            break;

        case SYSTEM_MESSAGE_TYPE.BATTLE_SHOWTEXT_MODE4:
            result = instance.GetTextColor("1602");
            break;

        case SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN:
            result = instance.GetTextColor("2002");
            break;

        case SYSTEM_MESSAGE_TYPE.BATTLE_RADIO_ALARM:
            result = instance.GetTextColor("1002");
            break;

        default:
            result = instance.GetTextColor("1106");
            break;
        }
        return(result);
    }
Exemple #4
0
    public void UpdateAggroSolInfo(GS_BATTLE_BOSS_AGGRO_NFY AggroSolData)
    {
        if (this.m_pkBossBattleChar == null)
        {
            return;
        }
        if (this.m_pkBossBattleChar.GetBUID() != AggroSolData.i16BUID)
        {
            return;
        }
        string empty = string.Empty;

        for (int i = 0; i < 3; i++)
        {
            if (AggroSolData.i8AggroValue[i] == 0)
            {
                this.m_itAggroSolIcon[i].Visible = false;
                this.m_lbAggroSolVal[i].Visible  = false;
                this.m_dwAggroSol_bg1[i].Visible = false;
                this.m_dwAggroSol_bg2[i].Visible = false;
            }
            else
            {
                NkBattleChar charByBUID = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(AggroSolData.i16AggroTargetBUID[i]);

                if (charByBUID != null)
                {
                    this.m_itAggroSolIcon[i].SetSolImageTexure(eCharImageType.SMALL, charByBUID.GetCharKindInfo().GetCharKind(), -1);
                }
                CTextParser arg_E7_0 = NrTSingleton <CTextParser> .Instance;
                object[]    expr_BA  = new object[3];
                expr_BA[0] = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672");

                expr_BA[1] = "Count";
                int arg_E6_1 = 2;
                int num      = (int)AggroSolData.i8AggroValue[i];
                expr_BA[arg_E6_1] = num.ToString();
                arg_E7_0.ReplaceParam(ref empty, expr_BA);
                this.m_lbAggroSolVal[i].SetText(empty);
                this.m_itAggroSolIcon[i].Visible = true;
                this.m_lbAggroSolVal[i].Visible  = true;
                this.m_dwAggroSol_bg1[i].Visible = true;
                this.m_dwAggroSol_bg2[i].Visible = true;
            }
        }
    }