Engine-Pong/Game/Behaviours/MovementMouseBehaviour.cs

14 lines
319 B
C#
Raw Normal View History

2024-01-25 22:15:52 +03:00
using System;
using Microsoft.Xna.Framework.Input;
using Syntriax.Engine.Core;
namespace Pong.Behaviours;
public class MovementMouseBehaviour : BehaviourOverride
{
protected override void OnUpdate()
{
GameObject.Transform.Position = Mouse.GetState().Position.ToVector2D().ApplyDisplayScale();
}
}