Пример #1
0
        public static EntityPosition Create(TilePos basePosition, EntityPosition other)
        {
            var offset           = basePosition - other.BasePosition;
            var relativePosition = other.RelativePosition - offset.Vec * Tile.RealSize;

            return(new EntityPosition(basePosition, relativePosition));
        }
Пример #2
0
 private Vector3I GetBaseDifference(EntityPosition other)
 {
     return((BasePosition - other.BasePosition).Vec * Tile.RealSize);
 }
Пример #3
0
 public Vector3 RelativeTo(EntityPosition other)
 {
     return(GetBaseDifference(other) + RelativePosition - other.RelativePosition);
 }