Ejemplo n.º 1
0
        public void HideAllVisualEffects(MoodVFX moodVfx)
        {
            foreach (var moodVFX in _moodVFXs)
            {
                if (moodVfx.EffectContainer == moodVFX.EffectContainer)
                {
                    continue;
                }

                moodVFX.EffectContainer.SetActive(false);
            }
        }
Ejemplo n.º 2
0
        public void ChangeVisualEffect(Mood mood)
        {
            List <MoodVFX> moodVFXs = _moodVFXs.Where(m => m.Mood == mood).ToList();

            if (moodVFXs.Count == 0)
            {
                return;
            }

            MoodVFX moodVFX = moodVFXs[Random.Range(0, moodVFXs.Count)];

            HideAllVisualEffects(moodVFX);
            moodVFX.EffectContainer.SetActive(true);
        }