Skip to content

Commit

Permalink
Merge pull request #7 from OUCC/#5-構造体の作成
Browse files Browse the repository at this point in the history
構造体をクラスに変更
  • Loading branch information
aiueo-1234 authored Jun 11, 2023
2 parents 3a3943d + 90fc958 commit 8a4ebc7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Assets/Scripts/BattleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace HackathonA
{
public readonly struct BattleData
public class BattleData
{
//playerのHP
public readonly int playerHp;
Expand All @@ -25,6 +25,18 @@ public readonly struct BattleData

//終了判定(TrueがPlayer先行、Falseが敵先行)
public readonly bool actionJudge;

public BattleData(int _playerHp,int _enemyHp, int _playerAction, int _enemyAction, int _playerDamageValue, int _enemyDamageValue, bool _actionJudge)
{
this.playerHp = _playerHp;
this.enemyHp = _enemyHp;
this.playerAction = _playerAction;
this.enemyAction = _enemyAction;
this.playerDamageValue = _playerDamageValue;
this.enemyDamageValue = _enemyDamageValue;
this.actionJudge = _actionJudge;

}
}
}

0 comments on commit 8a4ebc7

Please sign in to comment.