Package org.terasology.logic.players.event

Examples of org.terasology.logic.players.event.RespawnRequestEvent


    @Override
    public void initialise() {
        WidgetUtil.trySubscribe(this, "respawn", new ActivateEventListener() {
            @Override
            public void onActivated(UIWidget widget) {
                CoreRegistry.get(LocalPlayer.class).getClientEntity().send(new RespawnRequestEvent());
                getManager().closeScreen(DeathScreen.this);
            }
        });
        WidgetUtil.trySubscribe(this, "settings", new ActivateEventListener() {
            @Override
            public void onActivated(UIWidget widget) {
                getManager().pushScreen("settingsMenuScreen");
            }
        });
        WidgetUtil.trySubscribe(this, "mainMenu", new ActivateEventListener() {
            @Override
            public void onActivated(UIWidget widget) {
                CoreRegistry.get(LocalPlayer.class).getClientEntity().send(new RespawnRequestEvent());
                CoreRegistry.get(GameEngine.class).changeState(new StateMainMenu());
            }
        });
        WidgetUtil.trySubscribe(this, "exitGame", new ActivateEventListener() {
            @Override
View Full Code Here

TOP

Related Classes of org.terasology.logic.players.event.RespawnRequestEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.