43 lines
834 B
C#
43 lines
834 B
C#
using StgSharp.Math;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace StgSharp.Geometries
|
|
{
|
|
|
|
public interface IPlainEntity
|
|
{
|
|
public vec2d CenterPosition { get; set; }
|
|
|
|
public bool CollideWith(IPlainEntity entity);
|
|
}
|
|
|
|
|
|
|
|
public class PlainEntity:IPlainEntity
|
|
{
|
|
private PlainGeometry _shape;
|
|
|
|
vec2d IPlainEntity.CenterPosition
|
|
{
|
|
get => _shape.Coordination.LocalOrigin.Coord.XY;
|
|
set => throw new InvalidOperationException();
|
|
}
|
|
|
|
public PlainEntity(PlainGeometry shape)
|
|
{
|
|
_shape = shape;
|
|
}
|
|
|
|
bool IPlainEntity.CollideWith(IPlainEntity entity)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
}
|