/**
* Attack the player
*/
public void attack()
{
for (Entity e : getLevel().getEntities()){
if (e.isActive() && e instanceof Player)
if (!getLevel().isThroughWall(getLocation(), e.getLocation()) && getLocation().dist(((Player) e).getLocation()) < 4)
{
Player p = (Player) e;
p.takeDamage(80);
}
try
{
SoundStuff cam = new SoundStuff();
cam.AWP();
}
catch (UnsupportedAudioFileException | IOException | LineUnavailableException e1)
{
e1.printStackTrace();
}
}
}
Shotgun_Enemy.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:What-Happened-to-Station-7
作者:
评论列表
文章目录