Beispiel #1
0
    private void OnUiAttackDebug()
    {
        Rect fullscreenRect = DebugGuiSkin.GetFullscreenRect();
        Rect screenRect     = fullscreenRect;

        screenRect.height *= 0.375f;
        screenRect.y       = fullscreenRect.height - screenRect.height;
        GUILayout.BeginArea(screenRect);
        GUILayout.BeginVertical(new GUILayoutOption[0]);
        this.scrollPosition = GUILayout.BeginScrollView(this.scrollPosition, new GUILayoutOption[]
        {
            GUILayout.Width(screenRect.width),
            GUILayout.Height(screenRect.height)
        });
        GUILayout.BeginHorizontal("Box", new GUILayoutOption[0]);
        Boolean isTrance = GUILayout.Toggle(FF9StateSystem.Battle.isTrance[FF9StateSystem.Battle.selectCharPosID], "Trance", new GUILayoutOption[0]);

        if (isTrance != FF9StateSystem.Battle.isTrance[FF9StateSystem.Battle.selectCharPosID])
        {
            BattleUnit character = btl_scrp.FindBattleUnit((UInt16)(1 << FF9StateSystem.Battle.selectCharPosID));
            FF9StateSystem.Battle.isTrance[FF9StateSystem.Battle.selectCharPosID] = isTrance;
            if (isTrance)
            {
                character.Trance = Byte.MaxValue;
                character.AlterStatus(BattleStatus.Trance);
            }
            else
            {
                character.Trance = 0;
                character.RemoveStatus(BattleStatus.Trance);
            }
        }
        if (GUILayout.Button("Attack", new GUILayoutOption[0]))
        {
            HonoluluBattleMain.playCommand(FF9StateSystem.Battle.selectCharPosID, 0, 16, isTrance);
        }
        else if (GUILayout.Button("Skill1", new GUILayoutOption[0]))
        {
            HonoluluBattleMain.playCommand(FF9StateSystem.Battle.selectCharPosID, 1, 16, isTrance);
        }
        else if (GUILayout.Button("Skill2", new GUILayoutOption[0]))
        {
            HonoluluBattleMain.playCommand(FF9StateSystem.Battle.selectCharPosID, 2, 16, isTrance);
        }
        else if (GUILayout.Button("Item", new GUILayoutOption[0]))
        {
            HonoluluBattleMain.playCommand(FF9StateSystem.Battle.selectCharPosID, 3, 16, isTrance);
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal("Box", new GUILayoutOption[0]);
        GUILayout.Label("PlayerCount:" + FF9StateSystem.Battle.selectPlayerCount, new GUILayoutOption[0]);
        if (GUILayout.Button("<", new GUILayoutOption[0]))
        {
            FF9StateSystem.Battle.selectPlayerCount--;
            if (FF9StateSystem.Battle.selectPlayerCount <= 0)
            {
                FF9StateSystem.Battle.selectPlayerCount = 4;
                ff9play.FF9Play_SetParty(0, 0);
                ff9play.FF9Play_SetParty(1, 1);
                ff9play.FF9Play_SetParty(2, 2);
                ff9play.FF9Play_SetParty(3, 3);
            }
            else
            {
                ff9play.FF9Play_SetParty(FF9StateSystem.Battle.selectPlayerCount, -1);
            }
            SceneDirector.Replace("BattleMapDebug", SceneTransition.FadeOutToBlack_FadeIn, true);
        }
        if (GUILayout.Button(">", new GUILayoutOption[0]))
        {
            Int32 num = FF9StateSystem.Battle.selectPlayerCount++;
            if (FF9StateSystem.Battle.selectPlayerCount > 4)
            {
                FF9StateSystem.Battle.selectPlayerCount = 1;
                ff9play.FF9Play_SetParty(3, -1);
                ff9play.FF9Play_SetParty(2, -1);
                ff9play.FF9Play_SetParty(1, -1);
            }
            else
            {
                ff9play.FF9Play_SetParty(num, num);
            }
            SceneDirector.Replace("BattleMapDebug", SceneTransition.FadeOutToBlack_FadeIn, true);
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal("Box", new GUILayoutOption[0]);
        GUILayout.Label("CharPosID:" + FF9StateSystem.Battle.selectCharPosID, new GUILayoutOption[0]);
        if (GUILayout.Button("<", new GUILayoutOption[0]))
        {
            FF9StateSystem.Battle.selectCharPosID--;
            if (FF9StateSystem.Battle.selectCharPosID < 0)
            {
                FF9StateSystem.Battle.selectCharPosID = FF9StateSystem.Battle.selectPlayerCount - 1;
            }
        }
        if (GUILayout.Button(">", new GUILayoutOption[0]))
        {
            FF9StateSystem.Battle.selectCharPosID++;
            if (FF9StateSystem.Battle.selectCharPosID >= FF9StateSystem.Battle.selectPlayerCount)
            {
                FF9StateSystem.Battle.selectCharPosID = 0;
            }
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal("Box", new GUILayoutOption[0]);
        GUILayout.Label("CharModelID:" + FF9StateSystem.Common.FF9.party.member[FF9StateSystem.Battle.selectCharPosID].info.slot_no, new GUILayoutOption[0]);
        if (GUILayout.Button("<", new GUILayoutOption[0]))
        {
            Int32 num2 = BattleUI.currentDebugSerialCharacter[FF9StateSystem.Battle.selectCharPosID];
            do
            {
                if (num2 != 0)
                {
                    num2--;
                }
                else
                {
                    num2 = 11;
                }
            }while (Array.IndexOf <Int32>(BattleUI.currentDebugSerialCharacter, num2) != -1);
            ff9play.FF9Dbg_SetCharacter(num2, FF9StateSystem.Battle.selectCharPosID);
            BattleUI.currentDebugSerialCharacter[FF9StateSystem.Battle.selectCharPosID] = num2;
            SceneDirector.Replace("BattleMapDebug", SceneTransition.FadeOutToBlack_FadeIn, true);
        }
        if (GUILayout.Button(">", new GUILayoutOption[0]))
        {
            Int32 num3 = BattleUI.currentDebugSerialCharacter[FF9StateSystem.Battle.selectCharPosID];
            do
            {
                if (num3 < 12)
                {
                    num3++;
                }
                else
                {
                    num3 = 0;
                }
            }while (Array.IndexOf <Int32>(BattleUI.currentDebugSerialCharacter, num3) != -1);
            ff9play.FF9Dbg_SetCharacter(num3, FF9StateSystem.Battle.selectCharPosID);
            BattleUI.currentDebugSerialCharacter[FF9StateSystem.Battle.selectCharPosID] = num3;
            SceneDirector.Replace("BattleMapDebug", SceneTransition.FadeOutToBlack_FadeIn, true);
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal("Box", new GUILayoutOption[0]);
        GUILayout.Label("WeaponID:" + this.battleMain.GetWeaponID(FF9StateSystem.Battle.selectCharPosID), new GUILayoutOption[0]);
        if (GUILayout.Button("<", new GUILayoutOption[0]))
        {
            HonoluluBattleMain.CurPlayerWeaponIndex[FF9StateSystem.Battle.selectCharPosID]--;
            ff9feqp.FF9FEqp_Equip((Byte)FF9StateSystem.Battle.selectCharPosID, ref HonoluluBattleMain.CurPlayerWeaponIndex[FF9StateSystem.Battle.selectCharPosID]);
            SceneDirector.Replace("BattleMapDebug", SceneTransition.FadeOutToBlack_FadeIn, true);
        }
        if (GUILayout.Button(">", new GUILayoutOption[0]))
        {
            HonoluluBattleMain.CurPlayerWeaponIndex[FF9StateSystem.Battle.selectCharPosID]++;
            ff9feqp.FF9FEqp_Equip((Byte)FF9StateSystem.Battle.selectCharPosID, ref HonoluluBattleMain.CurPlayerWeaponIndex[FF9StateSystem.Battle.selectCharPosID]);
            SceneDirector.Replace("BattleMapDebug", SceneTransition.FadeOutToBlack_FadeIn, true);
        }
        GUILayout.EndHorizontal();
        GUILayout.EndScrollView();
        GUILayout.EndVertical();
        GUILayout.EndArea();
    }