예제 #1
0
        public ShootSimulator(GameTime time, Shooter shooter, float aimAngle)
        {
            actionValue = 0;
            EventHandlers.getInstance().collision += collisionEventHandler;
            simulatedBall = new Ball(null, shooter.calculateBallStartingLocation(aimAngle), aimAngle, true);

            Game1.addGameComponent(simulatedBall);

            while (!simulatedBall.ballFallen())
            {
                Game1.levelStateManager.currentLevel.physicsProcessor.Update(time);
            }

            EventHandlers.getInstance().collision -= collisionEventHandler;
            Game1.removeGameComponent(simulatedBall);
        }
예제 #2
0
 public BallFallenArgs(Ball ball)
 {
     this.ball = ball;
 }