public override void PerformCommand() { base.PerformCommand(); GameObject currentRoad = GetRoadFromAngle(transform.rotation.eulerAngles.y); GetComponent <GoCommand>().Roads.Remove(currentRoad); if (Roads.Contains(currentRoad)) { return; } Roads.Add(currentRoad); if (GetComponent <GoCommand> ()) { GetComponent <GoCommand> ().ResetCommand(); } this.TransformCommand(); }
public Boolean HasRoad(HexDirection direction) { return(Roads != null && Roads.Contains(direction)); }