Add interfaces
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user