コード例 #1
0
 public Model getBallModel(balls b)
 {
     switch (b)
     {
         case balls.Normal:
             return game.Content.Load<Model>("Models/Ball");
             break;
     }
     return null;
 }
コード例 #2
0
ファイル: Ball.cs プロジェクト: sketchydtail/brickles3k
        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;
            }
        }
コード例 #3
0
        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;
        }