private void reset(Boolean sendMove, Boolean resetHp) { if (resetHp) { this.curHP = mController.getData().getMaxHP(); } }
public Mob(MobController mController) { this.mController = mController; this.uID = WMap.Instance.mobsCount; this.maxHP = mController.getData().getMaxHP(); this.curHP = maxHP; WMap.Instance.mobsCount++; this.spawnX = mController.getSpawnX(); this.spawnY = mController.getSpawnY(); this.area = WMap.Instance.getGrid(mController.getMap()).getAreaByRound(spawnX, spawnY); this.positionX = Randomizer.NextInt(this.area.getGrid().getaSize()) + this.area.getAreaStartingPosition()[0]; // cause I can. this.positionY = Randomizer.NextInt(this.area.getGrid().getaSize()) + this.area.getAreaStartingPosition()[1]; // cause I can. if(area != null) area.addMob(this); else Console.WriteLine("out of grid kurwa. {0} {1} {2}", mController.getMap(), spawnX, spawnY); this.death = false; }
public Mob(MobController mController) { this.mController = mController; this.uID = WMap.Instance.mobsCount; this.maxHP = mController.getData().getMaxHP(); this.curHP = maxHP; WMap.Instance.mobsCount++; this.spawnX = mController.getSpawnX(); this.spawnY = mController.getSpawnY(); this.area = WMap.Instance.getGrid(mController.getMap()).getAreaByRound(spawnX, spawnY); this.positionX = Randomizer.NextInt(this.area.getGrid().getaSize()) + this.area.getAreaStartingPosition()[0]; // cause I can. this.positionY = Randomizer.NextInt(this.area.getGrid().getaSize()) + this.area.getAreaStartingPosition()[1]; // cause I can. if (area != null) { area.addMob(this); } else { Console.WriteLine("out of grid kurwa. {0} {1} {2}", mController.getMap(), spawnX, spawnY); } this.death = false; }