Fix CS
This commit is contained in:
parent
2484e4f1df
commit
d48d5b0285
5 changed files with 16 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue