示例#1
0
 void Start()
 {
     Instance = this;
     debugS   = debug;
     grid     = new GridComplete(10, 20, 1f, new Vector3(-13, -6), debug);
     grid.SetUnwalkable(unWalkableCells);
     pathAndRadiousVisualiation = GetComponent <VisualiationHandler>();
     currentState   = State.playerRound;
     OnStateChange += HandleStateChange;
     SetUp();
     UpdateObjectsInCellRefrences();
     SetUpOnGridReady();
 }
示例#2
0
            // Start is called before the first frame update
            void Start()
            {
                Instance = this;
                SetUpVisualiation(20, "Path Cell", ref pathVisualizationPool);
                SetUpVisualiation(100, "Radious Cell", ref radiousVisualizationnPool);
                SetUpVisualiation(100, "Abilities Cell", ref abilitiesVisualizationPool);
                gridCombatSystem.onGridReady     += SetUp;
                inputHandler.OnPlayerPathChanged += HandlePathVisualization;

                visualizeCell = Instantiate(activeCellSprite, Vector3.zero, activeCellSprite.transform.rotation);
                visualizeCell.SetActive(false);

                activeCellGameObject = Instantiate(activeCellSprite, new Vector3(0, 0, 0), activeCellSprite.transform.rotation);
                activeCellGameObject.SetActive(false);
            }