Ejemplo n.º 1
0
        // Update is called once per frame
        void Update()
        {
            if (from != null && to != null)
            {
                path = Pathfinding.FindPath(from, to);

                foreach (Tile t in allTiles)
                {
                    if (!path.tiles.Contains(t))
                    {
                        notPathTiles.Add(t);
                    }
                }

                HighlightManager.UnHighlightTileList(notPathTiles);
                HighlightManager.HighlightTileList(path.tiles);
                notPathTiles.Clear();
            }
        }
Ejemplo n.º 2
0
 public void OnUnitStrike()
 {
     HighlightManager.HighlightTileList(SelectedUnit.tilesWithinRange);
     StartCoroutine(State.Strike(SelectedTile));
 }
Ejemplo n.º 3
0
 public void OnUnitMove()
 {
     HighlightManager.HighlightTileList(SelectedUnit.tilesWithinMovement);
     StartCoroutine(State.Move(SelectedTile));
 }