onPush method
What should happen when this level is pushed into a level stack.
If fadeLength
is not null
, then music and all ambiances will be
faded in.
Implementation
@override
void onPush({final double? fadeLength}) {
super.onPush(fadeLength: fadeLength);
_sound = game.outputMessage(
message,
soundChannel: soundChannel,
oldSound: _sound,
);
final d = duration;
if (d != null) {
onDoneTask = game.callAfter(runAfter: d, func: onDone);
}
}