mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-02 10:07:15 +02:00
37 lines
985 B
C#
37 lines
985 B
C#
using System.Collections.Generic;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Shared.Physics;
|
|
|
|
namespace Robust.Shared.GameObjects.Components
|
|
{
|
|
public interface ICollidableComponent : IComponent, IPhysBody
|
|
{
|
|
|
|
bool IsColliding(Vector2 offset);
|
|
|
|
IEnumerable<IEntity> GetCollidingEntities(Vector2 offset);
|
|
bool UpdatePhysicsTree();
|
|
|
|
void RemovedFromPhysicsTree(MapId mapId);
|
|
void AddedToPhysicsTree(MapId mapId);
|
|
}
|
|
|
|
public interface ICollideSpecial
|
|
{
|
|
bool PreventCollide(IPhysBody collidedwith);
|
|
}
|
|
|
|
public interface ICollideBehavior
|
|
{
|
|
void CollideWith(IEntity collidedWith);
|
|
|
|
/// <summary>
|
|
/// Called after all collisions have been processed, as well as how many collisions occured
|
|
/// </summary>
|
|
/// <param name="collisionCount"></param>
|
|
void PostCollide(int collisionCount) { }
|
|
}
|
|
}
|