Esempio n. 1
0
 public void SpawnToPlayer(Burst_Plant parent, float vel, Player p)
 {
     Position = parent.Position + Vector2.One * 5;
     parabola = new Parabola_Thing(this, GlobalState.RNG.Next(24, 34), 1.5f);
     MoveTowards(p.Center, vel * 2.5f);
     _state.ChangeState("Move");
 }
Esempio n. 2
0
 public void Spawn(Burst_Plant parent, float max_vel, int sign)
 {
     Position   = parent.Position + Vector2.One * 5;
     parabola   = new Parabola_Thing(this, GlobalState.RNG.Next(24, 34), 0.7f + (float)GlobalState.RNG.NextDouble());
     velocity.X = -max_vel + 2 * max_vel * (float)GlobalState.RNG.NextDouble();
     velocity.Y = sign * MathF.Sqrt(max_vel * max_vel - velocity.X * velocity.X);
     _state.ChangeState("Move");
 }