From 14593af8749b03883110d9426631f0cf7eab7336 Mon Sep 17 00:00:00 2001 From: Adam Howard Date: Sun, 6 Feb 2011 17:29:09 +0000 Subject: [PATCH] Adjust friction values a little --- js/ball.js | 2 +- js/cue.js | 2 +- js/game.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ball.js b/js/ball.js index 0014e73..e341751 100644 --- a/js/ball.js +++ b/js/ball.js @@ -5,7 +5,7 @@ function Ball (x, y) { this.vy = 0; this.move=move; function move(){ - friction = 0.995 + friction = 0.99 this.vx *= friction; this.vy *= friction; if (this.vy < 0.1 && this.vy > -0.1 && this.vx < 0.1 && this.vx > -0.1) {this.vx = 0; this.vy = 0;} diff --git a/js/cue.js b/js/cue.js index 81bfaa2..3355904 100644 --- a/js/cue.js +++ b/js/cue.js @@ -5,7 +5,7 @@ function Cue (x, y) { this.vy = 0; this.move=move; function move(){ - friction = 0.995 + friction = 0.99 this.vx *= friction; this.vy *= friction; if (this.vy < 0.1 && this.vy > -0.1 && this.vx < 0.1 && this.vx > -0.1) {this.vx = 0; this.vy = 0;} diff --git a/js/game.js b/js/game.js index e64e604..06ba54f 100644 --- a/js/game.js +++ b/js/game.js @@ -6,7 +6,7 @@ var my; var offset = $('canvas').offset(); var shooting = false; var maxCuePull = 125; -var cueSpeedMultiplier = 0.05; +var cueSpeedMultiplier = 0.08; var width = 500; var height = 500;