Exemple #1
0
    void RemoveInfection()
    {
        if (stance == PlantStance.friendly)
        {
            // get neighbours
            PlantBase[] neighbours = PlantManager.Get8NeighboursForPosition(gridPos);
            for (int i = 0; i < neighbours.Length; i++)
            {
                // can't have null plants
                if (neighbours [i] == null)
                {
                    continue;
                }

                neighbours [i].ClearInfection();
            }
        }
    }