Restructure battle with Coroutines, monsters play from hand
This commit is contained in:
parent
28db788635
commit
6135ea1b24
4 changed files with 80 additions and 21 deletions
|
|
@ -9,9 +9,11 @@ public class PlayArea
|
|||
public event PlayAreaChangedAction OnPlayAreaChanged;
|
||||
|
||||
private List<BaseCard> heroPermanents;
|
||||
private List<BaseCard> monsterPermanents;
|
||||
|
||||
public PlayArea() {
|
||||
this.heroPermanents = new List<BaseCard>();
|
||||
this.monsterPermanents = new List<BaseCard>();
|
||||
}
|
||||
|
||||
public List<BaseCard> GetHeroPermanents() {
|
||||
|
|
@ -28,6 +30,16 @@ public class PlayArea
|
|||
TriggerPlayAreaChanged();
|
||||
}
|
||||
|
||||
public void AddPlayedMonsterPermanent(BaseCard permanent) {
|
||||
this.monsterPermanents.Add(permanent);
|
||||
TriggerPlayAreaChanged();
|
||||
}
|
||||
|
||||
public void RemoveMonsterPermanent(BaseCard permanent) {
|
||||
this.monsterPermanents.Remove(permanent);
|
||||
TriggerPlayAreaChanged();
|
||||
}
|
||||
|
||||
private void TriggerPlayAreaChanged() {
|
||||
if (OnPlayAreaChanged != null) OnPlayAreaChanged();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue