BattleSprites now observes hero and monster positions
This commit is contained in:
parent
2e5a971581
commit
6aa13cdbb7
3 changed files with 30 additions and 15 deletions
|
|
@ -516,27 +516,13 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
|
|||
}
|
||||
}
|
||||
|
||||
MoveTeamToNewPositions(effect.Team, newPositions);
|
||||
this.state.MoveTeamToNewPositions(effect.Team, newPositions);
|
||||
}
|
||||
|
||||
private static int TrueMod(int a, int b) {
|
||||
return (a % b + b) % b;
|
||||
}
|
||||
|
||||
private void MoveTeamToNewPositions(TeamChoice team, int[] newPositions) {
|
||||
this.state.MoveTeamToNewPositions(team, newPositions);
|
||||
|
||||
if (team == TeamChoice.Heroes) {
|
||||
for (int i = 0; i < this.state.Heroes.Length; i++) {
|
||||
this.battleSprites.PositionHero(this.state.Heroes[i], i);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < this.state.Monsters.Length; i++) {
|
||||
this.battleSprites.PositionMonster(this.state.Monsters[i], i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetupDefault(DefaultEffect effect) {
|
||||
DefaultHeroCard previousDefault = this.state.PlayArea.SetupDefault(effect);
|
||||
if (previousDefault != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue