1
Fork 0
mirror of https://github.com/Steffo99/octogem.git synced 2024-11-25 14:34:19 +00:00
octogem/Assets/Scripts/Components/Position/UnitPosition.cs

19 lines
429 B
C#

using UnityEngine;
using System;
public class UnitPosition : GenericPosition
{
public void JumpTo(MapPosition position)
{
this.Position = position;
}
public void StepTo(MapPosition position)
{
if(!position.IsAdjacent(this.Position))
{
throw new Exception("The new position is not adjacent to the current position");
}
this.Position = position;
}
}