Add heroes to BattleParameters
This commit is contained in:
parent
84782a9bb3
commit
ba0252298c
10 changed files with 155 additions and 105 deletions
|
|
@ -1,4 +1,7 @@
|
|||
public class BattleParameters {
|
||||
private HeroId[] heroIds;
|
||||
private HCardId[] hCardIds;
|
||||
private int[] hCardOwnerIndexes;
|
||||
private MonsterId[] monsterIds;
|
||||
private MCardId[] mCardIds;
|
||||
private int[] mCardOwnerIndexes;
|
||||
|
|
@ -7,6 +10,17 @@ public class BattleParameters {
|
|||
|
||||
}
|
||||
|
||||
public void SetHeroes(HeroId[] heroIds, HCardId[] hCardIds, int[] hCardOwnerIndexes) {
|
||||
if (hCardIds.Length != hCardOwnerIndexes.Length) {
|
||||
throw new System.ArgumentException(
|
||||
"hCardIds and hCardOwnerIndexes need to have the same length");
|
||||
}
|
||||
|
||||
this.heroIds = heroIds;
|
||||
this.hCardIds = hCardIds;
|
||||
this.hCardOwnerIndexes = hCardOwnerIndexes;
|
||||
}
|
||||
|
||||
public void SetMonsters(MonsterId[] monsterIds, MCardId[] mCardIds, int[] mCardOwnerIndexes) {
|
||||
if (mCardIds.Length != mCardOwnerIndexes.Length) {
|
||||
throw new System.ArgumentException(
|
||||
|
|
@ -18,6 +32,9 @@ public class BattleParameters {
|
|||
this.mCardOwnerIndexes = mCardOwnerIndexes;
|
||||
}
|
||||
|
||||
public HeroId[] HeroIds {get => this.heroIds;}
|
||||
public HCardId[] HCardIds {get => this.hCardIds;}
|
||||
public int[] HCardOwnerIndexes {get => this.hCardOwnerIndexes;}
|
||||
public MonsterId[] MonsterIds {get => this.monsterIds;}
|
||||
public MCardId[] MCardIds {get => this.mCardIds;}
|
||||
public int[] MCardOwnerIndexes {get => this.mCardOwnerIndexes;}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue