mirror of
https://github.com/chenasraf/strange-tactics.git
synced 2026-05-17 17:58:04 +00:00
20 lines
342 B
JavaScript
20 lines
342 B
JavaScript
const Tile = require('./tile')
|
|
|
|
class MovementTile extends Tile {
|
|
constructor(i, j, options = {}) {
|
|
super(i, j, {
|
|
color: color(30, 167, 255, 70),
|
|
stroke: false
|
|
})
|
|
|
|
this.character = options.character
|
|
}
|
|
|
|
onClick() {
|
|
this.character.moveTo(this.i, this.j)
|
|
this.destroy()
|
|
}
|
|
}
|
|
|
|
module.exports = MovementTile
|