Package Ocarina2D.Objects

Source Code of Ocarina2D.Objects.Sign

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package Ocarina2D.Objects;

import Ocarina2D.TextEngine.TextBox;
import puppyeyes.engine.Sprite;

/**
*
* @author majora
*/
public class Sign extends Talkable {
    public Sign() {
      super();
        addFrame(new Sprite("Resources/Sprites/objects/sign.png"));
        properties.setCollisionMask("Resources/Sprites/objects/signmask.png");
        properties.setSolid(true);
        draw.setVisible(true);
    }

    @Override
    public void startTalking () {
        TextBox text = new TextBox();
        //text.textInstant();
        text.addTextField("You're reading a sign!");
        text.addTextField("This is the second page of text, not that signs ever have that, but just thought it might be nice anyway...");

        text.addFrame(new Sprite("Resources/Sprites/Text/sign.png"));
            text=null;

        // Sleep so that things are not stupidly fast.
        try{    Thread.sleep(300);   }
        catch( InterruptedException e ) {  }
     }


}
TOP

Related Classes of Ocarina2D.Objects.Sign

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.