public void UsePowerOnOpponent(PowerUseParams param, GridScript gridScript, Grid grid) { if (gridScript.player.GameOver) { return; } Log.Info(gridScript.player.name + ": Power side effect START " + this); var midGrid = new Vector3(grid.width / 2f, grid.height / 2f); }
public void OnPowerUsed(Power power, PowerUseParams param) { // Dispatch to other players foreach (var p in players) { if (p.player.index != param.player.index && p.player.GameOver == false) { if (power.CanUseOnOpponent(p.grid, p.grid.TheGrid)) { power.UsePowerOnOpponent(param, p.grid, p.grid.TheGrid); } } } }
protected void RaisePowerUsed(PowerUseParams param) { OnPowerUsed?.Invoke(this, param); }
protected abstract IEnumerator UsePowerOnOpponent(GridScript gridScript, Grid grid, PowerUseParams param);