Пример #1
0
 public void OnEnergyActive(FlowerEnergyBase flower)
 {
     if (parentFlowers.Contains(flower))
     {
         return;
     }
     parentFlowers.Add(flower);
     EnergyActive();
 }
Пример #2
0
    private void OnActiveTriggerEnter(Collider2D collider)
    {
        FlowerEnergyBase flowerEnergy = collider.GetComponent <FlowerEnergyBase>();

        if (flowerEnergy == null)
        {
            return;
        }
        StartCoroutine(ActiveEnergyOnFlower(flowerEnergy));
    }
Пример #3
0
    IEnumerator ActiveEnergyOnFlower(FlowerEnergyBase flowerEnergy)
    {
        yield return(new WaitForSeconds(0.5f));

        flowerEnergy.OnEnergyActive(flowerEnergy);
    }