Ejemplo n.º 1
0
 public void Spawn(Frog parent, Player target)
 {
     Position = parent.Position;
     MoveTowards(target.Center, 15 * _multiplier);
     _state.ChangeState("Move");
     parabola.ResetTime();
 }
Ejemplo n.º 2
0
        IEnumerator Logic()
        {
            parabola.ResetTime();
            Position       = startPos;
            velocity       = Vector2.Zero;
            visible        = false;
            shadow.visible = true;
            shadow.Flicker(0.5f);
            Play("move");

            while (shadow._flickering)
            {
                yield return(null);
            }

            visible = true;
            SoundManager.PlaySoundEffect("bubble_1", "bubble_1", "bubble_2", "bubble_3");
            velocity.X = GlobalState.RNG.Next(10, 18);

            while (!parabola.Tick())
            {
                yield return(null);
            }

            Play("explode");

            while (!_curAnim.Finished)
            {
                yield return(null);
            }

            SoundManager.PlaySoundEffect("bubble_1", "bubble_1", "bubble_2", "bubble_3");
            exists = false;
        }