Skip to content

Commit 0c8223e

Browse files
committed
Deal with webclient's sub
1 parent eeb99b3 commit 0c8223e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

html/src/com/mygdx/game/client/HtmlLauncher.java

+7
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ public void dealWithDurationMultiplier(float multiplier) {
270270
processEvent(new Events.DurationMultiplier(multiplier));
271271
}
272272

273+
public void dealWithSubstitute(int spot, boolean sub) {
274+
addEvent(new Events.Sub(spot, sub));
275+
}
276+
273277
private native void setCallBacks() /*-{
274278
console.log("setting callbacks");
275279
var that = this;
@@ -303,6 +307,9 @@ private native void setCallBacks() /*-{
303307
$wnd.battle.on("duration-multiplier", function(multiplier) {
304308
[email protected]::dealWithDurationMultiplier(F)(multiplier);
305309
});
310+
$wnd.battle.on("substitute", function(spot, substitute) {
311+
[email protected]::dealWithSubstitute(*)(spot, substitute);
312+
});
306313
console.log("callbacks sets");
307314
}-*/;
308315

0 commit comments

Comments
 (0)