Пример #1
0
    /// <summary>
    /// 自分のターン 通常攻撃
    /// </summary>
    private void MyTurn_NormalAttack()
    {
        int    intBullet = int.Parse(OperatePlayerData.GetPlayerData("PlayerBullet"));
        string strBullet = Convert.ToString(intBullet - 1);

        OperatePlayerData.SetPlayerData(strBullet, "PlayerBullet");

        var query_Player = (from x in GameManager.xdoc_PlayerData.Descendants("Player")
                            select x).Single();
        var query_Enemy = (from x in GameManager.xdoc_BattleSheet.Descendants("Enemy")
                           where x.Element("BattleNo").Value == GameManager.TargetFlg
                           select x).Single();
        int PlayerAttackValue  = int.Parse(query_Player.Element("PlayerAttackValue_OnBattle").Value);
        int EnemyDiffenceValue = int.Parse(query_Enemy.Element("EnemyDiffenceValue").Value);

        GameManager.Text_MainWindow.text = OperatePlayerData.GetPlayerData("PlayerName") + "の攻撃!";

        StartCoroutine(GameManager.WaitTime_1());

        int Damage = CirculateParameter.DamageCirculate(PlayerAttackValue, EnemyDiffenceValue);

        GameManager.Text_MainWindow.text = GameManager.Text_MainWindow.text + "\n" + query_Enemy.Element("EnemyName").Value + "に" + Damage + "のダメージ!";

        StartCoroutine(GameManager.WaitTime_1());

        //攻撃結果ジャッジ
        if (ComparerParameter.JudgeDamageResult_Single_Player(Damage) == true)
        {
            ManageBattle.DeadEnemy_Single(GameManager.TargetFlg);
        }
    }
    /// <summary>
    /// 自分のターン パワーショット
    /// </summary>
    private void MyTurn_PowerShot()
    {
        int    intBullet = int.Parse(OperatePlayerData.GetPlayerData(GetXMLQueryKey_PlayerData.PlayerBullet()));
        string strBullet = Convert.ToString(intBullet - 2);

        OperatePlayerData.SetPlayerData(strBullet, GetXMLQueryKey_PlayerData.PlayerBullet());

        var query_Player = (from x in BattleStaticValiable.xdoc.Descendants("Player")
                            select x).Single();
        var query_Enemy = (from x in BattleStaticValiable.xdoc2.Descendants("Enemy")
                           where x.Element("BattleNo").Value == GameManager.TargetFlg
                           select x).Single();

        int PlayerAttackValue = int.Parse(query_Player.Element("PlayerAttackValue_OnBattle").Value) *
                                int.Parse(OperatePlayerSkill.GetPlayerSkillData(GetXMLQueryKey_PlayerSkill.PlayerSkill_DamagePercent(int.Parse(GameManager.SkillNoFlg)), int.Parse(GameManager.SkillNoFlg)));
        int EnemyDiffenceValue = int.Parse(query_Enemy.Element("EnemyDiffenceValue").Value);

        GameManager.Text_MainWindow.text = OperatePlayerData.GetPlayerData(GetXMLQueryKey_PlayerData.PlayerName()) + "はパワーショットを放った!";

        int Damage = CirculateParameter.DamageCirculate(PlayerAttackValue, EnemyDiffenceValue);

        GameManager.Text_MainWindow.text = GameManager.Text_MainWindow.text + "\n" + query_Enemy.Element("EnemyName").Value + "に" + Damage + "のダメージ!";

        StartCoroutine(GameManager.WaitTime_1());

        //攻撃結果ジャッジ
        if (ComparerParameter.JudgeDamageResult_Single_Player(Damage) == true)
        {
            ManageBattle.DeadEnemy_Single(GameManager.TargetFlg);
        }
    }