Example #1
0
    public void AddBoostNotifier(Boost boostPrefab)
    {
        for (int i = 0; i < notifiersInProgress.Count; i++)
        {
            Boost notifierBoost = ((BoostNotifier)notifiersInProgress[i]).GetBoost();
            if (notifierBoost.GetType() == boostPrefab.GetType() && notifierBoost.GetState() != BoostStates.FINISHED)
            {
                notifierBoost.SetActive();
                return;
            }
        }
        BoostNotifier notifier = GetBoostNotifier();
        Boost         boost    = Instantiate(boostPrefab) as Boost;

        boost.SetActive();
        notifier.SetBoost(boost);
        AddNotifier(notifier);
    }
Example #2
0
    private BoostNotifier GetBoostNotifier()
    {
        BoostNotifier notifier = Instantiate(boostNotifierPrefab) as BoostNotifier;

        return(notifier);
    }