1.2
This commit is contained in:
parent
63eb5d6572
commit
a4a544a001
|
@ -34,6 +34,8 @@ public class RegistryManager {
|
|||
scriptRegistry.add("setrespawn", SetRespawnScript.class);
|
||||
scriptRegistry.add("sound", SoundScript.class);
|
||||
scriptRegistry.add("title", TitleScript.class);
|
||||
scriptRegistry.add("settotalcountdown", SetTotalCountdownScript.class);
|
||||
scriptRegistry.add("setcountdown", SetCountdownScript.class);
|
||||
}
|
||||
|
||||
private static void registerObjective() {
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package com.io.yutian.thewardungeon.script.list;
|
||||
|
||||
import com.io.yutian.thewardungeon.data.LineMetadata;
|
||||
import com.io.yutian.thewardungeon.dungeon.DungeonInstance;
|
||||
import com.io.yutian.thewardungeon.script.Script;
|
||||
|
||||
public class SetCountdownScript extends Script {
|
||||
|
||||
private int countdown;
|
||||
|
||||
public SetCountdownScript(LineMetadata metadata) {
|
||||
super(metadata);
|
||||
countdown = metadata.getInt("countdown");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(DungeonInstance dungeonInstance) {
|
||||
dungeonInstance.setCountdown(countdown);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user