private void InitAllRoad(RoadPoint start) { lstAllRoad.Add(start); if (start.avaliableRoad.Count > 1) { for (int i = 0; i < start.avaliableRoad.Count; i++) { InitAllRoad(startPoint.avaliableRoad[i]); } } }
public void GotoNextRoad() { curRoadPoint = curRoadPoint.avaliableRoad[0]; curRoadPoint.isArrive = true; if (!curRoadPoint.EndPoint) { nextRoadPoint = curRoadPoint.avaliableRoad[0]; } else { nextRoadPoint = null; } }
private void Start() { curRoadPoint = startPoint; nextRoadPoint = startPoint.avaliableRoad[0]; InitAllRoad(startPoint); }