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); }
public BallFallenArgs(Ball ball) { this.ball = ball; }