Fix CS
This commit is contained in:
@@ -18,7 +18,7 @@ export class ActionableItem {
|
||||
* OR null if we are out of range.
|
||||
*/
|
||||
public actionableDistance(x: number, y: number): number|null {
|
||||
let distanceSquared = (x - this.sprite.x)*(x - this.sprite.x) + (y - this.sprite.y)*(y - this.sprite.y);
|
||||
const distanceSquared = (x - this.sprite.x)*(x - this.sprite.x) + (y - this.sprite.y)*(y - this.sprite.y);
|
||||
if (distanceSquared < this.activationRadiusSquared) {
|
||||
return distanceSquared;
|
||||
} else {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
},
|
||||
factory: (scene: GameScene, object: ITiledMapObject): ActionableItem => {
|
||||
// Idée: ESSAYER WebPack? https://paultavares.wordpress.com/2018/07/02/webpack-how-to-generate-an-es-module-bundle/
|
||||
let foo = new Sprite(scene, object.x, object.y, 'computer');
|
||||
const foo = new Sprite(scene, object.x, object.y, 'computer');
|
||||
scene.add.existing(foo);
|
||||
|
||||
return new ActionableItem(foo, 32);
|
||||
|
||||
Reference in New Issue
Block a user