private void ActivateMode(Pathfinding.Algorithm option) { Debug.Log("Clicked " + option); active = option; pathfinding.algorithm = option; // avatarScript.Stop(); hidePaused(); }
private void CreateGhost(Pathfinding.Algorithm alg, int num, Vector3 pos) { GameObject ghost = GameObject.CreatePrimitive(PrimitiveType.Cylinder); ghost.name = "Ghost" + num; ghost.transform.position = pos; Pathfinding script = ghost.AddComponent <Pathfinding>(); script.obstacles = closedCells; script.gridSize = gridSize; script.algorithm = alg; }