CS代写 package dungeonmania.entities.enemies;

package dungeonmania.entities.enemies;

import dungeonmania.Game;
import dungeonmania.battles.BattleStatistics;

Copyright By PowCoder代写 加微信 powcoder

import dungeonmania.battles.Battleable;
import dungeonmania.entities.Entity;
import dungeonmania.entities.Player;
import dungeonmania.map.GameMap;
import dungeonmania.util.Position;

public abstract class Enemy extends Entity implements Battleable {
private BattleStatistics battleStatistics;

public Enemy(Position position, double health, double attack) {
super(position.asLayer(Entity.CHARACTER_LAYER));
battleStatistics = new BattleStatistics(
BattleStatistics.DEFAULT_DAMAGE_MAGNIFIER,
BattleStatistics.DEFAULT_ENEMY_DAMAGE_REDUCER);

public boolean canMoveOnto(GameMap map, Entity entity) {
return entity instanceof Player;

public BattleStatistics getBattleStatistics() {
return battleStatistics;

public void onOverlap(GameMap map, Entity entity) {
if (entity instanceof Player) {
Player player = (Player) entity;
map.getGame().battle(player, this);

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

public void onMovedAway(GameMap map, Entity entity) {

public abstract void move(Game game);

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