public static PointObjectManager CreatePointObjectManager() { if (_pointObjectManager == null) { GameObject g = GameObject.Find("_pointObjectManager"); if (g == null) { g = new GameObject("_pointObjectManager"); } _pointObjectManager = g.AddComponent<PointObjectManager>(); } return _pointObjectManager; }
protected virtual void Init() { canvas = Canvas.FindObjectOfType<Canvas>(); canvasManager = canvas.GetComponent<CanvasManager>(); //WorldInterface.CreateGameWorld(worldSize); worldInterface = WorldInterface.CreateWorldInterface(worldSize); pointObjectManager = PointObjectManager.CreatePointObjectManager(); actionManager = gameObject.AddComponent<ActionManager>(); workManager = gameObject.AddComponent<WorkManager>(); pathFinder = new Pathfinder(); if (buildStartArea) { BuildStartArea(); } }