Ability death listener

This commit is contained in:
Anuken 2021-09-24 21:27:21 -04:00
parent de7dfc75f9
commit 096826a36f
3 changed files with 8 additions and 1 deletions

View File

@ -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{

View File

@ -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();
}

View File

@ -11,4 +11,4 @@ android.useAndroidX=true
#used for slow jitpack builds; TODO see if this actually works
http.socketTimeout=80000
http.connectionTimeout=80000
archash=e4ec2880dfdd5739ec75b5904d97ed3309c225d8
archash=b631e4ed8d93513a52ebee6f7e612f7d603062c8