mirror of
https://github.com/Sheldan/canvas.git
synced 2026-06-07 03:16:41 +00:00
survivors: adding collision for faster projectiles to also consider collisions between ticks
differentiating between pistol and homing pistol using projectile speed for straight projectile
This commit is contained in:
@@ -22,8 +22,11 @@ export class Player implements Drawable, Acting, Healthy {
|
||||
this._weapons.forEach(weapon => weapon.draw(ctx))
|
||||
}
|
||||
|
||||
public static generatePlayer(): Player {
|
||||
let player = new Player(new Vector(500, 500));
|
||||
public static generatePlayer(position?: Vector): Player {
|
||||
if(position === undefined) {
|
||||
position = new Vector(500, 500)
|
||||
}
|
||||
let player = new Player(position);
|
||||
player._color = 'blue';
|
||||
player._stats = Stats.defaultPlayerStats();
|
||||
player._speed = new Vector(0, 0)
|
||||
|
||||
Reference in New Issue
Block a user