1
Fork 0
mirror of https://github.com/Steffo99/octogem.git synced 2024-11-22 13:04:19 +00:00
octogem/Assets/Scripts/Components/Position/UnitPosition.cs
2018-09-27 00:38:49 +02:00

21 lines
471 B
C#

using UnityEngine;
using System;
public class UnitPosition : GenericPosition
{
public override MapPosition Position { get; set; }
void JumpTo(MapPosition position)
{
this.Position = position;
}
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;
}
}