Skip to content

Commit

Permalink
fix: clean up linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
benox3 committed Jan 27, 2019
1 parent eb76120 commit 6b691a5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/scenes/Main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Block, Player, Vip } from '../sprites';
import { FRAMES, SCENES, SHEET, TEXTURES } from '../constants';
import { Block, Vip } from '../sprites';
import { FRAMES, SCENES, TEXTURES } from '../constants';
import { Scene } from 'phaser';
import { Score } from '../texts';

const DEGREES = {
'90': Math.PI / 2,
Expand Down
2 changes: 1 addition & 1 deletion src/sprites/Block.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Physics } from 'phaser';
import { FRAMES, TEXTURES } from '../constants';
import { Physics } from 'phaser';

export default class Block extends Physics.Matter.Sprite {
constructor(world, x, y, texture, frame, options) {
Expand Down
15 changes: 15 additions & 0 deletions src/sprites/Vip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { SCENES, TEXTURES } from '../constants';
import { Physics } from 'phaser';

export default class Vip extends Physics.Matter.Sprite {
constructor(world, x, y, texture, frame) {
super(world, x, y, TEXTURES.BEAR);
world.scene.add.existing(this);
}

onCollision(body) {
if (body.gameObject !== null) {
this.world.scene.scene.start(SCENES.GAME_OVER);
}
}
}

0 comments on commit 6b691a5

Please sign in to comment.