Skip to content

Commit

Permalink
#34 bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
wpernath committed Sep 11, 2022
1 parent 3aecd01 commit 3208916
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions melonjs-client/src/main/client/js/renderables/base-weapon.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { NineSliceSprite, level, collision, Body, Rect } from "melonjs";
import { NineSliceSprite, level, collision, Body, Rect, Sprite } from "melonjs";
import { my_collision_types } from "../util/constants";


export class BaseWeapon extends NineSliceSprite {
export class BaseWeapon extends Sprite {
constructor(x, y, options) {
super(x, y, options);

// set the bodx for collision etc.
this.body = new Body(this);
this.body.addShape(new Rect(0, 0, options.width, options.height));
//this.body.addShape(new Rect(0, 0, options.width, options.height));
this.body.ignoreGravity = true;
this.body.isStatic = true;
this.body.collisionType = collision.types.PROJECTILE_OBJECT;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Sprite, Body, Rect, collision, game, level, Vector2d, timer } from "melonjs";
import { my_collision_types } from "../util/constants";
import GlobalGameState from "../util/global-game-state";
import { BaseWeapon } from "./base-weapon";
import ExplosionEntity from "./explosion";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Sprite, Body, Rect, collision, game, level, Vector2d, timer } from "melonjs";
import { my_collision_types } from "../util/constants";
import GlobalGameState from "../util/global-game-state";
import { BaseWeapon } from "./base-weapon";


Expand Down

0 comments on commit 3208916

Please sign in to comment.