示例#1
0
 protected override IEnumerator FadeOut()
 {
     eye1.FadeOut(0.5f);
     eye2.FadeOut(0.5f);
     softlight1.FadeOut(0.1f);
     softlight2.FadeOut(0.1f);
     return(base.FadeOut());
 }
示例#2
0
        IEnumerator DamageCooldown()
        {
            hurt         = true;
            sprite.Alpha = 0.8f;
            light.FadeOut(0.3f);
            yield return(Coroutine.Instance.WaitForFrames((int)(cooldownTimer * 60)));


            hurt         = false;
            sprite.Alpha = 1.0f;
            light.FadeIn(0.3f);
        }
示例#3
0
        private IEnumerator EnjoyLife()
        {
            sprite.Alpha -= 0.2f;
            yield return(Coroutine.Instance.WaitForFrames(4));

            light = new Light(0, 0.7f);
            light.SetAlpha(1.0f);
            light.SetColor(Color.Black);
            light.SetRadius(650);
            light.entity = this;
            Level.darkness.Add(light);

            float length = 10.0f;

            for (float timer = 0; timer < length; timer += Game.RealDeltaTime * 0.001f)
            {
                // TODO: Put out little "explosions"
                sprite.Alpha -= 0.01f;
                yield return(0);
            }

            light.FadeOut(10.0f);
            yield return(Coroutine.Instance.WaitForSeconds(10.0f));

            RemoveSelf();
        }
示例#4
0
        private IEnumerator EnjoyLife()
        {
            sprite.Alpha -= 0.2f;
            yield return Coroutine.Instance.WaitForFrames(4);

            light = new Light(0, 0.7f);
            light.SetAlpha(1.0f);
            light.SetColor(Color.Black);
            light.SetRadius(650);
            light.entity = this;
            Level.darkness.Add(light);

            float length = 10.0f;
            for (float timer = 0; timer < length; timer += Game.RealDeltaTime * 0.001f) {
                // TODO: Put out little "explosions"
                sprite.Alpha -= 0.01f;
                yield return 0;
            }

            light.FadeOut(10.0f);
            yield return Coroutine.Instance.WaitForSeconds(10.0f);

            RemoveSelf();
        }