better logging
This commit is contained in:
parent
d9daef380e
commit
13cd3db387
3 changed files with 22 additions and 8 deletions
|
@ -34,7 +34,7 @@ class Player {
|
|||
];
|
||||
|
||||
this.legalProps = [
|
||||
'vel', 'dir', 'camera', 'ticks', 'isMenu', 'r'
|
||||
'vel', 'dir', 'camera', 'ticks', 'isMenu', 'r', 'ref'
|
||||
];
|
||||
}
|
||||
bump() {
|
||||
|
@ -44,8 +44,6 @@ class Player {
|
|||
player.dir *= -1;
|
||||
}
|
||||
|
||||
console.log(player.ticks)
|
||||
|
||||
player.vel.x *= 0.3;
|
||||
player.vel.y *= 0.3;
|
||||
|
||||
|
@ -113,6 +111,7 @@ class Player {
|
|||
target.vel.y += (target.pos.y - ent.pos.y) * 0.1;
|
||||
|
||||
if (target.health <= 0 && oldHealth > 0) {
|
||||
console.log(`Player ${target.you} died to a player ${ent.you}`);
|
||||
ent.headCount++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue