fix melee attacks
This commit is contained in:
+8
-6
@@ -94,13 +94,13 @@ function laneScenario() {
|
||||
midWallStart.clone().add(midWallThickness),
|
||||
]
|
||||
|
||||
const midNorthWallOffset = new Vector2(-400, 400)
|
||||
const midNorthWallOffset = new Vector2(-450, 450)
|
||||
const midNorthWallPoints = midWallPoints.map((p) => p.clone().add(midNorthWallOffset))
|
||||
const midNorthWall = new Terrain(midNorthWallPoints)
|
||||
midNorthWall.id = 'midNorthWall'
|
||||
game.addTerrain(midNorthWall)
|
||||
|
||||
const midSouthWallOffset = new Vector2(0, 0)
|
||||
const midSouthWallOffset = new Vector2(50, -50)
|
||||
const midSouthWallPoints = midWallPoints.map((p) => p.clone().add(midSouthWallOffset))
|
||||
const midSouthWall = new Terrain(midSouthWallPoints)
|
||||
midSouthWall.id = 'midSouthWall'
|
||||
@@ -116,12 +116,14 @@ function laneScenario() {
|
||||
game.spawnEntity(new Entity(Template.minion(Team.red, { ranged: false, route: redRoute })))
|
||||
}
|
||||
|
||||
if ([(3 * game.tickRate), (4 * game.tickRate), (5 * game.tickRate)].includes(game.currentTick % (30 * game.tickRate))) {
|
||||
game.spawnEntity(new Entity(Template.minion(Team.blue, { ranged: true, route: blueRoute })))
|
||||
game.spawnEntity(new Entity(Template.minion(Team.red, { ranged: true, route: redRoute })))
|
||||
}
|
||||
// if ([(3 * game.tickRate), (4 * game.tickRate), (5 * game.tickRate)].includes(game.currentTick % (30 * game.tickRate))) {
|
||||
// game.spawnEntity(new Entity(Template.minion(Team.blue, { ranged: true, route: blueRoute })))
|
||||
// game.spawnEntity(new Entity(Template.minion(Team.red, { ranged: true, route: redRoute })))
|
||||
// }
|
||||
}
|
||||
game.logic = gameLogic
|
||||
|
||||
player1.abilities[0] = 'melee_attack'
|
||||
}
|
||||
|
||||
app.listen(port, () => {
|
||||
|
||||
Reference in New Issue
Block a user