Abstract class mob inherits from entity
This commit is contained in:
parent
ac0011e094
commit
bee23bc3c4
@ -10,15 +10,6 @@ void main()
|
||||
}
|
||||
|
||||
|
||||
abstract class Mob {
|
||||
float health;
|
||||
abstract void onSpawn();
|
||||
abstract void onTick(double delta);
|
||||
abstract void onHurt();
|
||||
abstract void onDeath();
|
||||
abstract void onDeathPoof();
|
||||
}
|
||||
|
||||
class Zombie : Mob {
|
||||
|
||||
this() {
|
||||
|
13
source/entity/mob/mob.d
Normal file
13
source/entity/mob/mob.d
Normal file
@ -0,0 +1,13 @@
|
||||
module entity.mob.mob;
|
||||
|
||||
import entity.entity;
|
||||
|
||||
// The base class for all mobs
|
||||
abstract class Mob : Entity {
|
||||
float health;
|
||||
abstract void onSpawn();
|
||||
abstract void onTick(double delta);
|
||||
abstract void onHurt();
|
||||
abstract void onDeath();
|
||||
abstract void onDeathPoof();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user