示例#1
0
 private void onHitPaddle(GameObject ball, Collider2D paddle)
 {
     if (Random.value <= 0.1f)
     {
         shadowBalls.Add(ShadowBall.CreateShadowBall(new Vector2(ball.transform.position.x, ball.transform.position.y + UnityEngine.Random.Range(-1.2f, 1.2f))));
     }
 }
示例#2
0
 public override void Activate(Ball ball, Player playerPaddle)
 {
     base.Activate(ball, playerPaddle);
     ball.OnHitPaddle += this.onHitPaddle;
     shadowBalls.Add(ShadowBall.CreateShadowBall(new Vector2(ball.transform.position.x, ball.transform.position.y + UnityEngine.Random.Range(-1.2f, 1.2f))));
     LevelsToLast = 1;
 }