public AStar(int x, int y, int rank, Classification classification) { this.x = x << 4; this.y = y << 4; this.rank = rank; this.classification = classification; sprite = animSprite.getSprite(); hitbox = new MobHitbox(Sprite.hitbox21x32); inventory = new Inventory(); healthBar0 = new MobHealthBar((int) this.x - 10, (int) this.y - 20, Sprite.healthBar0); healthBar25 = new MobHealthBar((int) this.x - 5, (int) this.y - 20, Sprite.healthBar25); healthBar50 = new MobHealthBar((int) this.x, (int) this.y - 20, Sprite.healthBar50); healthBar75 = new MobHealthBar((int) this.x + 5, (int) this.y - 20, Sprite.healthBar75); // Shooter default attributes maxHealth = Experience.calculateMobHealth(this, 100); health = maxHealth; maxMana = Experience.calculateMobMana(this, 100); mana = maxMana; armor = Experience.calculateMobArmor(this, 0); protectSpell = 0.0; }
public void render(Screen screen) { sprite = animSprite.getSprite(); screen.renderMob((int) (x - 16), (int) (y - 16), sprite); hitbox.render((int) x - 10, (int) y - 16, screen); }