21 lines
442 B
JavaScript
21 lines
442 B
JavaScript
/*
|
|
* Copyright (c) 2020. Antonio Martinez Casadesus and Pascal Syma.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
import Enemy from "./Enemy";
|
|
|
|
export default class Zombie extends Enemy {
|
|
|
|
constructor(scene, item) {
|
|
super(scene, item, "zombie");
|
|
}
|
|
|
|
|
|
turnedActive() {
|
|
super.turnedActive();
|
|
const vel = this.spawnPoint.properties.filter(obj => obj.name === "velocity")[0].value;
|
|
this.body.velocity.x = vel;
|
|
|
|
}
|
|
} |