(2a7829fab) Add ISpatialEntity as a common interface for everything that has a position in the game world. Would have used IMapEntity, but there's already MapEntity, which inherits Entity, so that would be confusing. Declare the inheritance only in the shared class (Character).
This commit is contained in:
@@ -6,7 +6,7 @@ using System.Text;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class Entity
|
||||
class Entity : ISpatialEntity
|
||||
{
|
||||
public const ushort NullEntityID = 0;
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
interface ISpatialEntity
|
||||
{
|
||||
Vector2 Position { get; }
|
||||
Vector2 WorldPosition { get; }
|
||||
Vector2 SimPosition { get; }
|
||||
Submarine Submarine { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user