forked from lieuzhenghong/discord-spatial-layer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add secret auth * add auth db * lint * fix Co-authored-by: Lieu Zheng Hong <lieu@lieuzhenghong.com>
- Loading branch information
Showing
28 changed files
with
336 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import * as PIXI from 'pixi.js' | ||
|
||
class GreenCircle extends PIXI.Container { | ||
constructor(entity) { | ||
super() | ||
this.x = entity.x | ||
this.y = entity.y | ||
this.isAlive = entity.isAlive // not really used... | ||
|
||
this.body = new PIXI.Graphics() | ||
this.body.beginFill(0xffffff) | ||
this.body.drawCircle(0, 0, 25) | ||
this.body.endFill() | ||
|
||
this.body.tint = 0x00ff00 | ||
|
||
this.addChild(this.body) | ||
} | ||
|
||
update(delta) { | ||
|
||
} | ||
} | ||
|
||
export default GreenCircle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,4 @@ class WeaponSystem { | |
} | ||
} | ||
|
||
export default WeaponSystem | ||
export default WeaponSystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import nengi from 'nengi' | ||
import SAT from 'sat' | ||
|
||
class GreenCircle { | ||
constructor(x, y) { | ||
this.x = x | ||
this.y = y | ||
this.isAlive = true | ||
this.collider = new SAT.Circle(new SAT.Vector(this.x, this.y), 25) | ||
} | ||
} | ||
|
||
GreenCircle.protocol = { | ||
x: { type: nengi.Float32, interp: false }, | ||
y: { type: nengi.Float32, interp: false }, | ||
} | ||
|
||
export default GreenCircle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ class Identity { | |
} | ||
|
||
Identity.protocol = { | ||
entityId: nengi.UInt16 | ||
entityId: nengi.UInt16, | ||
} | ||
|
||
export default Identity |
Oops, something went wrong.