mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Ability death listener
This commit is contained in:
parent
de7dfc75f9
commit
096826a36f
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user