add lasers
This commit is contained in:
parent
cf4e8024af
commit
f87aa1446d
31 changed files with 298 additions and 125 deletions
|
@ -121,6 +121,7 @@ class Body {
|
|||
|
||||
packFull() {
|
||||
let packet = {
|
||||
form: 'body',
|
||||
type: this.type,
|
||||
class: this.class,
|
||||
id: this.id,
|
||||
|
@ -140,6 +141,10 @@ class Body {
|
|||
return {};
|
||||
}
|
||||
|
||||
getWorldPos(pos) {
|
||||
return this.b2body.GetWorldPoint(new b2Vec2(pos.x, pos.y), {});
|
||||
}
|
||||
|
||||
get awake() {
|
||||
if (this.b2body.IsAwake()) {
|
||||
this.sleepTime = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue