added iTile life
This commit is contained in:
@@ -220,10 +220,12 @@ public class Player extends Entity {
|
||||
}
|
||||
}
|
||||
public void interactTile(int index) {
|
||||
if(index == 999 || !panel.iTile[index].destructible) return;
|
||||
if(index == 999 || !panel.iTile[index].destructible || panel.iTile[index].invincible) return;
|
||||
if(!panel.iTile[index].meetItemReq(this)) return;
|
||||
panel.iTile[index].playSE();
|
||||
panel.iTile[index] = panel.iTile[index].getDestroyedForm();
|
||||
panel.iTile[index].life--;
|
||||
panel.iTile[index].invincible = true;
|
||||
if(panel.iTile[index].life == 0) panel.iTile[index] = panel.iTile[index].getDestroyedForm();
|
||||
}
|
||||
|
||||
public void interactNPC(int index) {
|
||||
|
||||
Reference in New Issue
Block a user