canvas-based-core 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,12 +7,12 @@ export class CanvasCollisionDetection2D extends CanvasCollisionDetection {
7
7
  }
8
8
 
9
9
  static leftCollisionDetected(source, ctx){
10
- const x = (source.x + source.currentXVelocity) + 0.1;
10
+ const x = (source.x + source.xVelocity) + 0.1;
11
11
  return super.leftCollisionDetected(x, ctx);
12
12
  }
13
13
 
14
14
  static rightCollisionDetected(source, ctx){
15
- const x = ((source.x + source.width) + source.currentXVelocity) - 1;
15
+ const x = ((source.x + source.width) + source.xVelocity) - 1;
16
16
  return super.rightCollisionDetected(x, ctx);
17
17
  }
18
18
 
@@ -21,12 +21,12 @@ export class CanvasCollisionDetection2D extends CanvasCollisionDetection {
21
21
  }
22
22
 
23
23
  static topCollisionDetected(source, ctx){
24
- const y = (source.y + source.currentYVelocity) + 0.1;
24
+ const y = (source.y + source.yVelocity) + 0.1;
25
25
  return super.topCollisionDetected(y, ctx);
26
26
  }
27
27
 
28
28
  static bottomCollisionDetected(source, ctx){
29
- const y = ((source.y + source.height) + source.currentYVelocity) - 1;
29
+ const y = ((source.y + source.height) + source.yVelocity) - 1;
30
30
  return super.bottomCollisionDetected(y, ctx);
31
31
  }
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-based-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "canvas-based-core",
5
5
  "homepage": "https://github.com/pr1v4te4cc0unt/canvas-based-core#readme",
6
6
  "bugs": {