added iTile life
This commit is contained in:
@@ -16,16 +16,18 @@ public class DryTreeTI extends InteractiveTile{
|
||||
|
||||
down1 = initEntitySprites("/interactive_tiles/drytree");
|
||||
destructible = true;
|
||||
life = 3;
|
||||
}
|
||||
|
||||
public boolean meetItemReq(Entity entity) {
|
||||
return entity.currentWeapon.weaponType == EntityType.WeaponType.AXE;
|
||||
}
|
||||
|
||||
// PRE_CONFIGURED
|
||||
public void playSE() {
|
||||
panel.playSE(11);
|
||||
}
|
||||
|
||||
// GETTERS
|
||||
public boolean meetItemReq(Entity entity) {
|
||||
return entity.currentWeapon.weaponType == EntityType.WeaponType.AXE;
|
||||
}
|
||||
public InteractiveTile getDestroyedForm() {
|
||||
return new TrunkIT(panel, worldX/panel.tileSize, worldY/panel.tileSize);
|
||||
}
|
||||
|
||||
@@ -13,17 +13,25 @@ public class InteractiveTile extends Entity {
|
||||
this.panel = panel;
|
||||
}
|
||||
|
||||
// GENERAL
|
||||
public void update() {
|
||||
// INVINCIBLE COUNTER
|
||||
if(!invincible) return;
|
||||
invincibleCount++;
|
||||
if(invincibleCount > 20) {
|
||||
invincible = false;
|
||||
invincibleCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// PRE-CONFIGURED
|
||||
public void playSE() {}
|
||||
|
||||
public InteractiveTile getDestroyedForm() {
|
||||
return null;
|
||||
}
|
||||
|
||||
// UTILITY
|
||||
public boolean meetItemReq(Entity entity) {
|
||||
return false;
|
||||
}
|
||||
public InteractiveTile getDestroyedForm() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user