add range indicator
This commit is contained in:
+16
-6
@@ -116,14 +116,24 @@ 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
|
||||
// game.logic = gameLogic
|
||||
|
||||
player1.abilities[0] = 'melee_attack'
|
||||
player2.teleport(new Vector2(100, 100))
|
||||
player2.logic = function patrolLogic() {
|
||||
const entity = this
|
||||
if (entity.position.x < 100) { entity.memory.patrolReverse = false }
|
||||
if (entity.position.x > 1900) { entity.memory.patrolReverse = true }
|
||||
const goal = entity.memory.patrolReverse ? new Vector2(50, 100) : new Vector2(1950, 100)
|
||||
|
||||
entity.moveAction(goal)
|
||||
}
|
||||
|
||||
// player1.abilities[0] = 'melee_attack'
|
||||
}
|
||||
|
||||
app.listen(port, () => {
|
||||
|
||||
Reference in New Issue
Block a user