public static bool Gen(Point origin, GenShape shape, GenAction action) { return(shape.Perform(origin, action)); }
public ContinueWrapper(GenAction action) { this._action = action; }
public override bool Perform(Point origin, GenAction action) { Vector2 start = new Vector2((float)(origin.X << 4), (float)(origin.Y << 4)); return(Utils.PlotTileTale(start, start + this._endOffset, this._width, (Utils.TileActionAttempt)((x, y) => this.UnitApply(action, origin, x, y) || !this._quitOnFail))); }
public static GenAction Continue(GenAction action) { return((GenAction) new Actions.ContinueWrapper(action)); }
public override bool Perform(Point origin, GenAction action) { Vector2 vector = new Vector2(origin.X << 4, origin.Y << 4); return(Utils.PlotTileTale(vector, vector + _endOffset, _width, (int x, int y) => UnitApply(action, origin, x, y) || !_quitOnFail)); }