Пример #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();
            }
        }
Пример #2
0
 public void OnUnitStrike()
 {
     HighlightManager.HighlightTileList(SelectedUnit.tilesWithinRange);
     StartCoroutine(State.Strike(SelectedTile));
 }
Пример #3
0
 public void OnUnitMove()
 {
     HighlightManager.HighlightTileList(SelectedUnit.tilesWithinMovement);
     StartCoroutine(State.Move(SelectedTile));
 }