mirror of
https://github.com/Steffo99/octogem.git
synced 2024-11-22 13:04:19 +00:00
21 lines
471 B
C#
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;
|
|
}
|
|
}
|