BREAKING CHANGE: New ICollider
This commit is contained in:
9
Engine.Physics2D/Abstract/ICircleCollider2D.cs
Normal file
9
Engine.Physics2D/Abstract/ICircleCollider2D.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Syntriax.Engine.Physics2D.Primitives;
|
||||
|
||||
namespace Syntriax.Engine.Physics2D.Abstract;
|
||||
|
||||
public interface ICircleCollider2D : ICollider2D
|
||||
{
|
||||
Circle CircleLocal { get; set; }
|
||||
Circle CircleWorld { get; }
|
||||
}
|
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Syntriax.Engine.Core;
|
||||
using Syntriax.Engine.Core.Abstract;
|
||||
|
||||
@@ -9,11 +7,9 @@ namespace Syntriax.Engine.Physics2D.Abstract;
|
||||
public interface ICollider2D : IBehaviour, IAssignableTransform
|
||||
{
|
||||
Action<ICollider2D, ICollider2D>? OnCollisionPreResolve { get; set; }
|
||||
Action<ICollider2D, ICollider2D>? OnCollisionResolved { get; set; }
|
||||
|
||||
IRigidBody2D? RigidBody2D { get; }
|
||||
|
||||
IList<Vector2D> Vertices { get; }
|
||||
|
||||
bool CheckCollision(Vector2D point);
|
||||
void Recalculate();
|
||||
}
|
||||
|
@@ -11,4 +11,5 @@ public interface IRigidBody2D : IBehaviour, IAssignableTransform
|
||||
float AngularVelocity { get; set; }
|
||||
|
||||
float Mass { get; set; }
|
||||
bool IsStatic { get; set; }
|
||||
}
|
||||
|
9
Engine.Physics2D/Abstract/IShapeCollider2D.cs
Normal file
9
Engine.Physics2D/Abstract/IShapeCollider2D.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Syntriax.Engine.Physics2D.Primitives;
|
||||
|
||||
namespace Syntriax.Engine.Physics2D.Abstract;
|
||||
|
||||
public interface IShapeCollider2D : ICollider2D
|
||||
{
|
||||
Shape ShapeLocal { get; set; }
|
||||
Shape ShapeWorld { get; }
|
||||
}
|
Reference in New Issue
Block a user