fix projectiles

This commit is contained in:
Asraelite 2016-03-29 01:44:02 +01:00
parent 0906441246
commit 4f42723f4a
7 changed files with 20 additions and 8 deletions

View file

@ -5,9 +5,11 @@ const Rope = require('../../copula/rope.js');
class Grapple extends Projectile {
constructor(world, pos, source) {
// pos.x *= 32, pos.y *= 32, idk why
super(world, pos);
this.r = pos.r;
this.x = pos.x * 32;
this.y = pos.y * 32;
this.xvel += Math.cos(this.r) * 0.25;
this.yvel += Math.sin(this.r) * 0.25;