You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.0 KiB
52 lines
1.0 KiB
package mightypork.rogue.screens.test_cat_sound;
|
|
|
|
|
|
import mightypork.gamecore.control.AppAccess;
|
|
import mightypork.gamecore.gui.screens.LayeredScreen;
|
|
import mightypork.gamecore.input.KeyStroke;
|
|
import mightypork.gamecore.input.Keys;
|
|
import mightypork.rogue.Res;
|
|
import mightypork.rogue.events.ActionRequest;
|
|
import mightypork.rogue.events.ActionRequest.RequestType;
|
|
|
|
|
|
public class ScreenTestCat extends LayeredScreen {
|
|
|
|
public ScreenTestCat(AppAccess app) {
|
|
super(app);
|
|
|
|
addLayer(new LayerFlyingCat(this));
|
|
|
|
bindKey(new KeyStroke(Keys.ESCAPE), new Runnable() {
|
|
|
|
@Override
|
|
public void run()
|
|
{
|
|
getSoundSystem().fadeOutAllLoops();
|
|
getEventBus().sendDelayed(new ActionRequest(RequestType.SHUTDOWN), 3);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
@Override
|
|
protected void onScreenEnter()
|
|
{
|
|
getSoundSystem().fadeOutAllLoops();
|
|
Res.getLoop("test.wilderness").fadeIn();
|
|
}
|
|
|
|
|
|
@Override
|
|
protected void onScreenLeave()
|
|
{
|
|
Res.getLoop("test.wilderness").fadeOut();
|
|
}
|
|
|
|
|
|
@Override
|
|
public String getName()
|
|
{
|
|
return "test.cat";
|
|
}
|
|
}
|
|
|