Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehjohn committed Jan 14, 2024
1 parent 894358c commit e04d4dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AoC.Games/Games/Deflectors/Actors/ArenaManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using AoC.Games.Games.Deflectors.Levels;
using AoC.Games.Infrastructure;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
Expand Down Expand Up @@ -112,7 +113,9 @@ public void Update()
{
LastMirrorPosition = _mirrorPosition;

var position = (X: _input.MouseX, Y: _input.MouseY);
var scaleFactor = AppSettings.Instance.ScaleFactor;

var position = (X: (int) (_input.MouseX / scaleFactor), Y: (int) (_input.MouseY / scaleFactor));

if (position.X >= 0 && position.X < Constants.MapSize * Constants.TileSize && position.Y >= Constants.TopOffset && position.Y < Constants.MapSize * Constants.TileSize + Constants.TopOffset && Mirror != '\0')
{
Expand Down

0 comments on commit e04d4dc

Please sign in to comment.