private void UpdateTileGetter() { ArchitectTilePositionGetter newTilePositionGetter = new ArchitectTilePositionGetter(MainCam.GetMouseWorldPosition(), SelectedLayer); if (newTilePositionGetter.TilePosition != tilePositionGetter.TilePosition) { tilePositionGetter = newTilePositionGetter; } }
public static ToolCommandBase Create(ToolType tool, ArchitectToolControler toolControler, ArchitectTilePositionGetter getter) { switch (tool) { case ToolType.Brush: return new BrushCommand(getter, toolControler.SelectedTileType, toolControler.RotationFlip); //case ToolType.Eraser: return new EraserTool(architect, getter); } return null; }
public void bob() { LayerData layer = new LayerData(null, "Layer", 2, 2); ArchitectTilePositionGetter tilePosition = new ArchitectTilePositionGetter(Vector3.zero, layer); TileType type = new TileType(5); ArchitectRotationFlip rotation = new ArchitectRotationFlip(90, false, false); BrushCommand brush = new BrushCommand(tilePosition, type, rotation); bool done = brush.Do(); Debug.Log(done); Assert.IsTrue(done); }
protected ToolCommandBase(ArchitectTilePositionGetter tilePositionGetter) { this.tilePositionGetter = tilePositionGetter; }
public static ToolCommandBase Create(ToolType tool, ArchitectToolControler toolControler, ArchitectTilePositionGetter getter) { switch (tool) { case ToolType.Brush: return(new BrushCommand(getter, toolControler.SelectedTileType, toolControler.RotationFlip)); //case ToolType.Eraser: return new EraserTool(architect, getter); } return(null); }
public BrushCommand(ArchitectTilePositionGetter tilePositionGetter, TileType tileType, ArchitectRotationFlip RotationFlip) : base(tilePositionGetter) { DoTileType = tileType; DoRotationFlip = RotationFlip; }
protected ToolCommandBase(ArchitectTilePositionGetter tilePositionGetter) { this.tilePositionGetter = tilePositionGetter; }
public BrushCommand(ArchitectTilePositionGetter tilePositionGetter, TileType tileType, ArchitectRotationFlip RotationFlip) : base(tilePositionGetter) { DoTileType = tileType; DoRotationFlip = RotationFlip; }