Engine-Pong/Game/Physics2D/Abstract/ICollider2D.cs

26 lines
689 B
C#
Raw Normal View History

2023-11-30 17:52:09 +03:00
using System;
using System.Collections.Generic;
2023-12-04 13:14:23 +03:00
using System.Diagnostics.CodeAnalysis;
2023-11-30 17:52:09 +03:00
using Microsoft.Xna.Framework;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Physics2D.Abstract;
public interface ICollider2D : IBehaviour, IAssignableTransform
{
2023-12-04 13:14:23 +03:00
IRigidBody2D? RigidBody2D { get; }
2023-11-30 17:52:09 +03:00
Action<ICollider2D, ICollider2D>? OnCollision { get; set; }
Vector2 OffsetPosition { get; set; }
Vector2 OffsetScale { get; set; }
float OffsetRotation { get; set; }
IReadOnlyList<Vector2> Vertices { get; }
2023-12-01 17:42:07 +03:00
2023-12-04 17:48:22 +03:00
bool CheckCollision(Vector2 point, ICollider2D otherCollider, out CollisionInformation collisionInformation);
2023-11-30 17:52:09 +03:00
void RecalculateVertices();
}