示例#1
0
 public void to_paddle2()
 {
     if (moving_type == moving_types.paddle_t)
     {
         moving_type = moving_types.paddle2_t;
         timeout     = breakout_definitions.paddle2_timeout;
     }
 }
示例#2
0
 public void ball(int initx, int inity, int velx, int vely, int rad)
 {
     moving_type = moving_types.ball_t;
     x           = initx;
     y           = inity;
     vx          = velx;
     vy          = vely;
     radius      = rad;
     timeout     = 0;
 }
示例#3
0
 public void paddle(int initx, int inity)
 {
     moving_type = moving_types.paddle_t;
     x           = initx;
     y           = inity;
     vx          = 0;
     vy          = 0;
     radius      = 0;
     timeout     = 0;
 }
示例#4
0
 private bool falls_below(Context context, int ny)
 {
     if (ny == breakout_definitions.y_res - 3 * radius)
     {
         erase(context);
         moving_type = moving_types.none_t;
         return(true);
     }
     return(false);
 }
示例#5
0
 public moving()
 {
     moving_type = moving_types.none_t;
 }