public override void Enter() { base.Enter(); aa = turn.ability.GetComponent <AbilityArea>(); tiles = aa.GetTilesInArea(board, pos); board.SelectTiles(tiles); FindTargets(); RefreshPrimaryStatPanel(turn.actor.tile.pos); SetTarget(0); if (turn.targets.Count > 0) { //only show indicator for player units if (driver.Current == Drivers.Human) { hitSuccessIndicator.Show(); } SetTarget(0); } // Only show this UI for AI controlled units if (driver.Current == Drivers.Computer) { StartCoroutine(ComputerDisplayAbilitySelection()); } }
void RefreshSelectArea() { board.SelectTiles(turn.abilityRange); tiles = aa.GetTilesInArea(board, pos); board.SelectTiles(tiles, Color.magenta); // Find the targets in ability area FindTargets(); }
public override void Enter() { base.Enter(); aa = turn.ability.GetComponent <AbilityArea>(); tiles = aa.GetTilesInArea(board, pos); board.SelectTiles(tiles); FindTargets(); RefreshPrimaryStatPanel(turn.actor.tile.pos); SetTarget(0); }
public override void Enter() { base.Enter(); aa = turn.phaser.GetComponent <AbilityArea>(); tiles = aa.GetTilesInArea(board, pos); board.SelectTiles(tiles, Color.magenta); // Find the targets in ability area FindTargets(); RefreshPrimaryStatPanel(turn.actor.tile.pos); SetTarget(0); attackSuccessIndicator.Show(); }
public override void Enter() { base.Enter(); aa = turn.phaser.GetComponent <AbilityArea>(); tiles = aa.GetTilesInArea(board, pos); points = turn.abilityRange.Select(tile => tile.pos).ToList(); ConfineInTargetRange(points); board.SelectTiles(tiles, Color.magenta); // Find the targets in ability area FindTargets(); RefreshPrimaryStatPanel(turn.actor.tile.pos); }
public override void Enter() { base.Enter (); aa = turn.ability.GetComponent<AbilityArea> (); tiles = aa.GetTilesInArea (board, pos); board.SelectTiles (tiles); FindTargets (); RefreshPrimaryStatPanel (turn.actor.tile.pos); if (turn.targets.Count > 0) { hitSuccessIndicator.Show (); SetTarget (0); } }
private void RateFireLocation(PlanOfAttack poa, AttackOption attackOption) { AbilityArea area = poa.ability.GetComponent <AbilityArea>(); List <Tile> tiles = area.GetTilesInArea(bc.board, attackOption.target.pos); attackOption.areaTargets = tiles; attackOption.isCasterMatch = IsAbilityTargetMatch(poa, actor.tile); for (int i = 0; i < tiles.Count; ++i) { Tile tile = tiles[i]; if (actor.tile == tiles[i] || !poa.ability.IsTarget(tile)) { continue; } bool isMatch = IsAbilityTargetMatch(poa, tile); attackOption.AddMark(tile, isMatch); } }