public void ProcessInput(InputManager input) { bool inWindow = Collision.InBounds(GraphicsManager.WindowWidth, GraphicsManager.WindowHeight, input.MouseLoc); Loc tileCoords = DungeonEditScene.Instance.ScreenCoordsToMapCoords(input.MouseLoc); switch (TileMode) { case TileEditMode.Draw: { EffectTile brush = getBrush(); CanvasStroke <EffectTile> .ProcessCanvasInput(input, tileCoords, inWindow, () => new DrawStroke <EffectTile>(tileCoords, brush), () => new DrawStroke <EffectTile>(tileCoords, new EffectTile()), paintStroke, ref DungeonEditScene.Instance.TileInProgress); } break; case TileEditMode.Rectangle: { EffectTile brush = getBrush(); CanvasStroke <EffectTile> .ProcessCanvasInput(input, tileCoords, inWindow, () => new RectStroke <EffectTile>(tileCoords, brush), () => new RectStroke <EffectTile>(tileCoords, new EffectTile()), paintStroke, ref DungeonEditScene.Instance.TileInProgress); } break; case TileEditMode.Fill: { EffectTile brush = getBrush(); CanvasStroke <EffectTile> .ProcessCanvasInput(input, tileCoords, inWindow, () => new FillStroke <EffectTile>(tileCoords, brush), () => new FillStroke <EffectTile>(tileCoords, new EffectTile()), fillStroke, ref DungeonEditScene.Instance.TileInProgress); } break; case TileEditMode.Eyedrop: { if (input[FrameInput.InputType.LeftMouse]) { eyedropTile(tileCoords); } } break; } }
public void ProcessInput(InputManager input) { bool inWindow = Collision.InBounds(GraphicsManager.WindowWidth, GraphicsManager.WindowHeight, input.MouseLoc); Loc tileCoords = GroundEditScene.Instance.ScreenCoordsToBlockCoords(input.MouseLoc); switch (BlockMode) { case TileEditMode.Draw: { CanvasStroke <bool> .ProcessCanvasInput(input, tileCoords, inWindow, () => new DrawStroke <bool>(tileCoords, true), () => new DrawStroke <bool>(tileCoords, false), paintStroke, ref GroundEditScene.Instance.BlockInProgress); } break; case TileEditMode.Rectangle: { CanvasStroke <bool> .ProcessCanvasInput(input, tileCoords, inWindow, () => new RectStroke <bool>(tileCoords, true), () => new RectStroke <bool>(tileCoords, false), paintStroke, ref GroundEditScene.Instance.BlockInProgress); } break; case TileEditMode.Fill: { CanvasStroke <bool> .ProcessCanvasInput(input, tileCoords, inWindow, () => new FillStroke <bool>(tileCoords, true), () => new FillStroke <bool>(tileCoords, false), fillStroke, ref GroundEditScene.Instance.BlockInProgress); } break; } }