Add interfaces

This commit is contained in:
Ramtin Jafari
2026-07-07 17:15:42 +03:30
parent 01cef05115
commit d880c5c616
6 changed files with 42 additions and 0 deletions
@@ -0,0 +1,8 @@
package org.project.Interface;
import org.project.entity.Entity;
public interface IAttachable {
public void AttachTo(Entity entity);
public void DeattachFrom(Entity entity);
}
@@ -0,0 +1,9 @@
package org.project.Interface;
import org.project.constants.gameConstant.AttackPowerUp;
public interface IDamageable {
public void TakeDamage(int amount, AttackPowerUp[] powerUps);
public boolean IsDestroyed();
public void HandleZeroHealth();
}
@@ -0,0 +1,7 @@
package org.project.Interface;
public interface IDamager {
public void Damage(IDamageable target);
public IDamager[] GetUtils();
public int GetDamage();
}
@@ -0,0 +1,5 @@
package org.project.Interface;
public interface IDefendable {
public IDefender[] GetDefenders();
}
@@ -0,0 +1,8 @@
package org.project.Interface;
import org.project.constants.gameConstant.AttackPowerUp;
public interface IDefender {
public int Apply(int damage, AttackPowerUp[] powerUps);
public int GetDefense();
}
@@ -0,0 +1,5 @@
package org.project.Interface;
public interface IHealable {
public void Heal(int amount);
}