Beispiel #1
0
    public void UpdatePosition()
    {
        if (this.m_goTarget == null)
        {
            this.Close();
            return;
        }
        if (this.m_goTarget.CastedTarget == null)
        {
            this.Close();
            return;
        }
        Vector3 pos = Vector3.zero;

        pos    = this.m_goTarget.CastedTarget.transform.position;
        pos    = GUICamera.WorldToEZ(pos);
        pos.x -= base.GetSizeX() / 2f;
        base.SetLocation(pos.x, pos.y);
    }
Beispiel #2
0
    public override void Update()
    {
        base.Update();
        this.OnGeneralTouchCallback();
        if (this.m_TargetChar != null && this.m_TargetChar.CastedTarget != null)
        {
            Nr3DCharBase nr3DCharBase = this.m_TargetChar.CastedTarget.Get3DChar();
            if (nr3DCharBase != null)
            {
                Vector2 zero  = Vector2.zero;
                Vector2 zero2 = Vector2.zero;
                Vector3 pos   = Vector3.zero;
                pos   = nr3DCharBase.GetRootGameObject().transform.position;
                pos   = GUICamera.WorldToEZ(pos);
                zero  = new Vector2(pos.x, pos.y - 150f);
                zero2 = new Vector2(pos.x - 20f, pos.y - 190f);
                this.Move(zero, zero2);
            }
        }
        if (this._ScreenWidth != GUICamera.width || this._ScreenHeight != GUICamera.height)
        {
            this.ResizeDlg();
        }
        if (this.m_nOtherWinID != G_ID.NONE)
        {
            Form form = NrTSingleton <FormsManager> .Instance.GetForm(this.m_nOtherWinID);

            if (form != null)
            {
                form.SetLocation(form.GetLocationX(), form.GetLocationY(), NrTSingleton <FormsManager> .Instance.GetTopMostZ() - 1f);
            }
        }
        if (!this.bAutoClose)
        {
            return;
        }
        if (Time.realtimeSinceStartup > this.fCloseTime)
        {
            this.Close();
        }
    }
Beispiel #3
0
    public void SetBattleTutorial(int value1, int value2, NkBattleChar pkBattleChar)
    {
        base.SetShowLayer(0, false);
        base.SetShowLayer(1, true);
        this.SetTextBattle(value1.ToString());
        if (value1 == 101010703)
        {
            Vector2 zero  = Vector2.zero;
            Vector2 zero2 = Vector2.zero;
            if (pkBattleChar != null)
            {
                this.m_TargetChar = pkBattleChar;
                Vector3 pos = Vector3.zero;
                pos   = this.m_TargetChar.CastedTarget.Get3DChar().GetRootGameObject().transform.position;
                pos   = GUICamera.WorldToEZ(pos);
                zero  = new Vector2(pos.x, pos.y - 150f);
                zero2 = new Vector2(pos.x - 20f, pos.y - 190f);
            }
            else
            {
                zero  = new Vector2(GUICamera.width / 2f + this.m_Touch.width, GUICamera.height / 2f - 150f);
                zero2 = new Vector2(GUICamera.width / 2f, GUICamera.height / 2f - 190f);
            }
            this.Move(zero, zero2);
            this._BG.UsedCollider(false);
        }
        else if (value1 == 101010701)
        {
            Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg;

            if (battle_Control_Dlg == null)
            {
                return;
            }
            Vector2 skillButtonPos = battle_Control_Dlg.GetSkillButtonPos();
            Vector3 v = new Vector2(skillButtonPos.x + 60f, skillButtonPos.y - 25f);
            Vector2 x = new Vector2(skillButtonPos.x - this.m_HelpText.GetSize().x - 30f, skillButtonPos.y - 55f);
            this.Move(v, x);
            this._BG.UsedCollider(false);
        }
    }
Beispiel #4
0
    public void UpdatePosition()
    {
        if (this.m_TargetChar == null)
        {
            return;
        }
        if (!this.m_TargetChar.CastedTarget.IsReady3DModel())
        {
            return;
        }
        if (this.MAXHP != (float)this.m_TargetChar.CastedTarget.GetMaxHP(false))
        {
            this.MAXHP = (float)this.m_TargetChar.CastedTarget.GetMaxHP(false);
        }
        Vector3 pos = Vector3.zero;

        pos    = this.m_TargetChar.CastedTarget.Get3DChar().GetRootGameObject().transform.position;
        pos    = GUICamera.WorldToEZ(pos);
        pos.x -= base.GetSizeX() / 2f;
        base.SetLocation(pos.x, pos.y);
    }