Esempio n. 1
0
    private void ExpandHitUnits(BoardCreator board, List <UnitStats> hit, Point next)
    {
        Tile t = board.GetTile(next);

        if (t != null && t.content != null)
        {
            UnitStats unit = t.content.GetComponent <UnitStats>();

            if (!unit.IsDead() && unit.ConductsElectricity() && !hit.Contains(unit))
            {
                hit.Add(unit);

                ExpandHitUnits(board, hit, t);
            }
        }
    }