public Model getBallModel(balls b) { switch (b) { case balls.Normal: return game.Content.Load<Model>("Models/Ball"); break; } return null; }
public void changeBall(balls b) { Model = scene.game.assetManager.getBallModel(b); switch (b) { case balls.Normal: bounce = 0.8f; break; case balls.Steel: bounce = 0.3f; break; case balls.Super: bounce = 1.3f; break; } }
public void pictureBox1_MouseClick(object sender, MouseEventArgs e) { int x = e.X; int y = pictureBox1.Height - e.Y - 275; balls tmp = new balls(); tmp.b_x = 20; tmp.b_y = pictureBox1.Height - 275; tmp.v_x = 0; tmp.v_y = 0; tmp.use = 1; list_balls.Add(tmp); timer1.Start(); tmp.v_x = 20; tmp.v_y = (20 * y) / x; }