Event things
This commit is contained in:
@@ -171,7 +171,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
}
|
||||
});
|
||||
|
||||
Events.on(Trigger.newGame, () -> {
|
||||
Events.run(Trigger.newGame, () -> {
|
||||
Building core = player.closestCore();
|
||||
|
||||
if(core == null) return;
|
||||
|
||||
@@ -2,7 +2,6 @@ package mindustry.mod;
|
||||
|
||||
import arc.*;
|
||||
import arc.files.*;
|
||||
import arc.func.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import arc.util.Log.*;
|
||||
@@ -76,10 +75,6 @@ public class Scripts implements Disposable{
|
||||
|
||||
//utility mod functions
|
||||
|
||||
public <T> void onEvent(Class<T> type, Cons<T> listener){
|
||||
Events.on(type, listener);
|
||||
}
|
||||
|
||||
public String readString(String path){
|
||||
return Vars.tree.get(path, true).readString();
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ public class HudFragment extends Fragment{
|
||||
float[] coreAttackTime = {0};
|
||||
float[] coreAttackOpacity = {0};
|
||||
|
||||
Events.on(Trigger.teamCoreDamage, () -> {
|
||||
Events.run(Trigger.teamCoreDamage, () -> {
|
||||
coreAttackTime[0] = notifDuration;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user