Files
RobustToolbox/Robust.Shared/GameObjects/Components/Collidable/ICollidableComponent.cs
T

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) { }
}
}