예제 #1
0
        private IEnumerator AddBaby()
        {
            yield return(Coroutine.Instance.WaitForFrames(1));

            if (babies > 0)
            {
                velocity.Normalize();
                child        = Scene.Add(new SeaLink(X, Y, babies - 1, velocity * (spaceAmount / 2)));
                child.head   = this;
                child.target = this;
            }
            else
            {
                var explosion = Scene.Add(new Explosion(X, Y));
                explosion.SetAlpha(3.0f, 0.5f, 1.0f, 0.8f, 0.5f);
                explosion.SetRadius(3.0f, 20.0f, 100.0f);
            }

            while (sprite.ScaleX < 1.0f)
            {
                sprite.Scale = sprite.ScaleX + 0.03f;
                yield return(0);
            }

            sprite.Scale = 1.0f;
        }
예제 #2
0
        private IEnumerator AddBaby()
        {
            yield return Coroutine.Instance.WaitForFrames(1);

            if (babies > 0) {
                velocity.Normalize();
                child = Scene.Add(new SeaLink(X, Y, babies - 1, velocity * (spaceAmount / 2)));
                child.head = this;
                child.target = this;
            } else {
                var explosion = Scene.Add(new Explosion(X, Y));
                explosion.SetAlpha(3.0f, 0.5f, 1.0f, 0.8f, 0.5f);
                explosion.SetRadius(3.0f, 20.0f, 100.0f);
            }

            while (sprite.ScaleX < 1.0f) {
                sprite.Scale = sprite.ScaleX + 0.03f;
                yield return 0;
            }

            sprite.Scale = 1.0f;
        }