Beispiel #1
0
        virtual public void Play(BubbleDeathType type)
        {
            Play();

            var effects = EffectDictionary.ContainsKey(type) ? EffectDictionary[type] : GetDefaultEffects(type);

            foreach (var effect in effects)
            {
                effectController.AddEffect(effect);
            }
        }
Beispiel #2
0
        public void AddEffect(GameObject parent, AnimationType type, BubbleDeathType deathType, bool blocking)
        {
            if (!EffectDictionary.ContainsKey(deathType))
            {
                EffectDictionary.Add(deathType, new List <IEnumerator>());
            }

            var effect = blocking ? AnimationEffect.PlayAndRegister(parent, type, RegisterBlockers) :
                         AnimationEffect.Play(parent, type);

            EffectDictionary[deathType].Add(effect);
        }