add camera movement
This commit is contained in:
+9
-4
@@ -48,15 +48,20 @@ app.listen(port, () => {
|
||||
|
||||
const entity2 = new Entity()
|
||||
entity2.id = '2'
|
||||
entity2.teleport(800, 100)
|
||||
entity2.teleport(35, 35)
|
||||
entity2.radius = 35
|
||||
game.spawn_entity(entity2)
|
||||
|
||||
const vertices = [
|
||||
{ x: 400, y: 400 },
|
||||
{ x: 600, y: 400 },
|
||||
{ x: 600, y: 600 },
|
||||
{ x: 400, y: 200 },
|
||||
{ x: 600, y: 200 },
|
||||
{ x: 700, y: 300 },
|
||||
{ x: 650, y: 600 },
|
||||
{ x: 400, y: 600 },
|
||||
{ x: 400, y: 450 },
|
||||
{ x: 600, y: 500 },
|
||||
{ x: 600, y: 300 },
|
||||
{ x: 400, y: 300 },
|
||||
]
|
||||
|
||||
const terrain1 = new Terrain(vertices)
|
||||
|
||||
Reference in New Issue
Block a user