public EdgeLogic GetEdge(int levelId, eEdgeType type) { if (type == eEdgeType.Horizon) { return(GameObject.Instantiate(hEdge).GetComponent <EdgeLogic>()); } if (type == eEdgeType.Vetical) { return(GameObject.Instantiate(vEdge).GetComponent <EdgeLogic>()); } return(null); }
public LevelEdge(LevelNode A, LevelNode B) { start = A; end = B; if (start.xIndex == end.xIndex) { edgeType = eEdgeType.Vetical; } else { edgeType = eEdgeType.Horizon; } pos = GetPosition(LevelManager.h1, LevelManager.h2); }