CS代写 package dungeonmania.entities.enemies;

package dungeonmania.entities.enemies;

import dungeonmania.Game;
import dungeonmania.entities.Entity;

Copyright By PowCoder代写 加微信 powcoder

import dungeonmania.entities.Interactable;
import dungeonmania.entities.Player;
import dungeonmania.map.GameMap;
import dungeonmania.util.Position;

public class ZombieToastSpawner extends Entity implements Interactable {
public static final int DEFAULT_SPAWN_INTERVAL = 0;

public ZombieToastSpawner(Position position, int spawnInterval) {
super(position);

public void spawn(Game game) {
game.getEntityFactory().spawnZombie(game, this);

public void onDestroy(GameMap map) {
Game g = map.getGame();
g.unsubscribe(getId());

public void interact(Player player, Game game) {
player.getInventory().getWeapon().use(game);

public boolean isInteractable(Player player) {
return Position.isAdjacent(player.getPosition(), getPosition()) && player.hasWeapon();

public void onOverlap(GameMap map, Entity entity) {

public void onMovedAway(GameMap map, Entity entity) {

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com