Ability death listener
This commit is contained in:
@@ -7,6 +7,7 @@ import mindustry.gen.*;
|
||||
public abstract class Ability implements Cloneable{
|
||||
public void update(Unit unit){}
|
||||
public void draw(Unit unit){}
|
||||
public void death(Unit unit){}
|
||||
|
||||
public Ability copy(){
|
||||
try{
|
||||
|
||||
@@ -517,6 +517,12 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
}
|
||||
}
|
||||
|
||||
if(abilities.size > 0){
|
||||
for(Ability a : abilities){
|
||||
a.death(self());
|
||||
}
|
||||
}
|
||||
|
||||
remove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user