Move ParticipantActivity to BattleState
This commit is contained in:
parent
04d00ebede
commit
86715b790d
3 changed files with 14 additions and 11 deletions
|
|
@ -5,7 +5,14 @@ public class ParticipantActivity {
|
|||
|
||||
private Dictionary<BattleParticipant, List<BaseCard>> mCardsUsedThisRound = new Dictionary<BattleParticipant, List<BaseCard>>();
|
||||
|
||||
public ParticipantActivity() {
|
||||
public ParticipantActivity(BattleClock clock) {
|
||||
clock.OnTimeChanged += this.NotifyTimeChanged;
|
||||
}
|
||||
|
||||
private void NotifyTimeChanged(BattleTime now) {
|
||||
if (now.RoundStep == RoundStep.StartOfRound) {
|
||||
mCardsUsedThisRound.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void NotifyParticipantUsedCard(BattleParticipant participant, BaseCard card) {
|
||||
|
|
@ -23,8 +30,4 @@ public class ParticipantActivity {
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void NextRound() {
|
||||
mCardsUsedThisRound.Clear();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue