Package transientlibs.preui.objects.states

Source Code of transientlibs.preui.objects.states.TransientStoryState

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package transientlibs.preui.objects.states;

import transientlibs.preui.agents.misc.StoryAgent;
import transientlibs.preui.agents.rendering.GDXGenericStateDrawAgent;
import transientlibs.preui.objects.gui.elements.InfoGroup;
import transientlibs.preui.objects.gui.interfaces.IMarker;
import transientlibs.processors.misc.Detonator;
import transientlibs.slick2d.util.Log;

/**
*
* @author kibertoad
*/
public class TransientStoryState extends TransientState {

    //public InfoGroup messageLog;   
    //public TextMarker back;
    public TransientStoryState(int setID, String setStringID) {
        super(setID, setStringID);
    }

    @Override
    public void postInit() {
        super.postInit(); //To change body of generated methods, choose Tools | Templates.

        //back = addMarker(Detonator.INSTANCE.imageProvider.getImage("city28"), Detonator.INSTANCE.imageProvider.getImage("city28"), 0, 0);
    }

    @Override
    public void init() {
        super.init(); //To change body of generated methods, choose Tools | Templates.

        story = new StoryAgent(this, "storyoverlay");
        Detonator.INSTANCE.storyOverlay = story;

        this.drawAgent = new GDXGenericStateDrawAgent(this);
    }

    @Override
    public void render() {
        super.render(); //To change body of generated methods, choose Tools | Templates.

        processInput();

        spriteBatch.begin();
        story.render(spriteBatch);
        spriteBatch.end();
       
        //for (IMarker m : drawStorage) {
        //    m.draw(spriteBatch);
        //}

        if (story.isEnabled == false) {
            this.enterState("map");
        }
    }

    @Override
    public void enter() {
        super.enter();

        Log.warn("Entered story state");

        story.actionButtons.restartFilling();
        story.actionButtons.complete();

        //story.queueStory("event3");
        story.enable();
    }
}
TOP

Related Classes of transientlibs.preui.objects.states.TransientStoryState

TOP
Copyright © 2018 www.massapi.com. 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.