public void RedTile(ShotCoord coord) { Rectangle tile = GetTile(coord); DOTween.To(() => tile.Color, x => tile.Color = x, Color.red, 0.25f).OnComplete(() => DOTween.To(() => tile.Color, x => tile.Color = x, Color.white, 0.25f)).SetEase(Ease.InCirc); }
private ShotCoord[] GenerateShotCoords() { ShotCoord[] result = new ShotCoord[3]; for (int i = 0; i < 3; i++) { result[i] = new ShotCoord(selectedTileIndexes[i]); } return(result); }
public void DoARed(int player, ShotCoord coord) { if (player == 0) { playerSide.RedTile(coord); } else { cpuSide.RedTile(coord); } }
public void DoAGreen(int player, ShotCoord coord) { if (player == 0) { playerSide.GreenTile(coord); } else { cpuSide.GreenTile(coord); } }
private Rectangle GetTile(ShotCoord coord) { return(tiles[coord.Index]); }