blob: 8005961349c56289470db6ac15c34d2dd52638ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using Microsoft.Xna.Framework;
using MonoGame.Extended.Collisions;
namespace MonoGame.Extended.Benchmarks.Collisions.Utils;
public class Collider: ICollisionActor
{
public Collider(Point2 position)
{
Bounds = new RectangleF(position, new Size2(1, 1));
}
public Collider(IShapeF shape)
{
Bounds = shape;
}
public IShapeF Bounds { get; set; }
public Vector2 Shift { get; set; }
public Point2 Position {
get => Bounds.Position;
set => Bounds.Position = value;
}
public void OnCollision(CollisionEventArgs collisionInfo)
{
}
}
|