From acea7b2e728787a0d83bbf83c8c1f042d2c32e7e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 3 Jun 2024 10:15:45 +0800 Subject: + plugins project --- .../ICollisionActor.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Plugins/MonoGame.Extended/source/MonoGame.Extended.Collisions/ICollisionActor.cs (limited to 'Plugins/MonoGame.Extended/source/MonoGame.Extended.Collisions/ICollisionActor.cs') diff --git a/Plugins/MonoGame.Extended/source/MonoGame.Extended.Collisions/ICollisionActor.cs b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Collisions/ICollisionActor.cs new file mode 100644 index 0000000..6a05592 --- /dev/null +++ b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Collisions/ICollisionActor.cs @@ -0,0 +1,27 @@ +using System; + +namespace MonoGame.Extended.Collisions +{ + /// + /// An actor that can be collided with. + /// + public interface ICollisionActor + { + /// + /// A name of layer, which will contains this actor. + /// If it equals null, an actor will insert into a default layer + /// + string LayerName { get => null; } + + /// + /// A bounds of an actor. It is using for collision calculating + /// + IShapeF Bounds { get; } + + /// + /// It will called, when collision with an another actor fires + /// + /// Data about collision + void OnCollision(CollisionEventArgs collisionInfo); + } +} -- cgit v1.1-26-g67d0