fix dead state

This commit is contained in:
2025-01-22 22:52:08 +09:00
parent 4f8dcebcd1
commit 0db1ceeedc
10 changed files with 263 additions and 43 deletions
+20 -3
View File
@@ -6,11 +6,28 @@ import Terrain from './terrain.js'
export class Dungeon {
static scenario(game) {
game.width = 3000
game.height = 3000
game.width = 2500
game.height = 1500
const from = new Vector2(100, 100)
const team = Team.blue
const enemy = Team.neutral
game.spawnEntity(new Entity(Template.player({ id: '1', spawnPosition: new Vector2(1500, 700), team })))
game.spawnEntity(new Entity(Template.player({ id: '2', spawnPosition: new Vector2(200, 1300), team, health: 10 })))
game.spawnEntity(new Entity(Template.basilisk({ id: 'boss', spawnPosition: new Vector2(2200, 750), team: enemy })))
setTimeout(() => game.entities.find((it) => it.id == '1').damage(9999), 10)
game.start()
}
}
export class Zigzag {
static scenario(game) {
game.width = 3000
game.height = 2000
const from = new Vector2(100, 100)
game.spawnEntity(new Entity(Template.player({ id: '1', spawnPosition: from, pathfindingObstacleLimit: 1, pathfindingCooldown: 0 })))
for (let i = 100; i < game.width; i += 300) {
const highest = ((i - 100) % 600) == 0 ? 0 : 500