24 lines
564 B
C#
24 lines
564 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
using Syntriax.Engine.Core.Abstract;
|
|
|
|
namespace Syntriax.Engine.Physics2D.Abstract;
|
|
|
|
public interface ICollider2D : IBehaviour, IAssignableTransform
|
|
{
|
|
Action<ICollider2D, ICollider2D>? OnCollision { get; set; }
|
|
|
|
Vector2 OffsetPosition { get; set; }
|
|
Vector2 OffsetScale { get; set; }
|
|
float OffsetRotation { get; set; }
|
|
IReadOnlyList<Vector2> Vertices { get; }
|
|
|
|
|
|
bool CheckCollision(Vector2 point, ICollider2D otherCollider);
|
|
|
|
void RecalculateVertices();
|
|
}
|