public NodeBehaviour GetNextNode(PassageDirection direction) { if (direction == PassageDirection.Up) { return(up); } else if (direction == PassageDirection.Donw) { return(down); } else if (direction == PassageDirection.Left) { return(left); } else if (direction == PassageDirection.Right) { return(right); } return(null); }
public bool CheckCanMove(PassageDirection direction) { if (direction == PassageDirection.Up && up != null) { return(true); } else if (direction == PassageDirection.Donw && down != null) { return(true); } else if (direction == PassageDirection.Left && left != null) { return(true); } else if (direction == PassageDirection.Right && right != null) { return(true); } return(false); }
public void MovimentCurrentNode(PassageDirection direction) { currentNode = currentNode.GetNextNode(direction); }
public bool CheckCanMove(PassageDirection direction) { return(currentNode.CheckCanMove(direction)); }