Examples of Iscene


Examples of org.mt4j.sceneManagement.Iscene

        this.doSceneChange(this.getCurrentScene(), this.pendingTransition.nextScene);
        this.pendingTransition = null;
      }
    }else{
      //Draw the current scene
      Iscene theCurrentScene = this.getCurrentScene();
      if (theCurrentScene != null){
        theCurrentScene.drawAndUpdate(this.g, timeDelta)
      }
    }
//     */
   
    /*
 
View Full Code Here

Examples of org.mt4j.sceneManagement.Iscene

   * If the stack is empty no error is thrown and no scene change will happen.
   */
  public boolean popScene(){
//    Iscene stackScene = sceneStack.pollFirst();
   
    Iscene stackScene = sceneStack.peek();
    if (stackScene != null){
      logger.debug("Popping scene: " + stackScene.getName() " back from the stack.");
      boolean changed = this.changeScene(stackScene);
      if (changed){
        sceneStack.pollFirst();
        return true;
      }else{
View Full Code Here

Examples of org.mt4j.sceneManagement.Iscene

    //Lock scene changes to only 1 at a time. At sending the bridge events during the
    //scene change, it could occur that a scene change could be triggered again which we prevent
    if (!sceneChangeLocked){
      sceneChangeLocked = true;
     
      Iscene lastScene = this.getCurrentScene();
     
      //Remove pending animations //
      //FIXME problemes, if new animations are defined in a scenes constructor, they get removed here..
      //AnimationManager.getInstance().clear();
     
      //Flush events so that enqueued input ended get sent to the last scene
      //(Problem: they have been removed from active cursor pool already so they dont
      //appear there and no ended and started evts are sent to the scenes!
      //IF input started or updated should be flushed with this they should appear in active
      //cursor list after that and be sended the right events
      //- maybe only flush input_ended?
      for (AbstractInputSource abstractInputSource : getInputManager().getInputSources()) {
        abstractInputSource.flushEvents();
      }
     
      //Check which cursors are still active and clone their last evt as INPUT_ENDED
      //so the scene can complete its state (i.e. buttons are be released etc)
      this.sendEndedEvents(lastScene);

      //Disable the last scene's global input processors
      this.getInputManager().disableGlobalInputProcessors(lastScene);
     
//      /*
      if (lastScene.getTransition() != null){
        ITransition t = lastScene.getTransition();
        this.pendingTransition = new TransitionInfo(t, lastScene, newScene);
        t.init();
        t.setup(lastScene, newScene);
        return true;
      }else{
View Full Code Here

Examples of org.mt4j.sceneManagement.Iscene

  public void addAll(Iscene[] scenes){
//    if (this.getSceneCount() == 0 && scenes[0] != null){
//      this.currentScene = scenes[0];
//    }
    for (int i = 0; i < scenes.length; i++) {
      Iscene scene = scenes[i];
//      sceneList.add(scene);
      this.addScene(scene);
    }
  }
View Full Code Here

Examples of org.mt4j.sceneManagement.Iscene

   * @param name the name
   *
   * @return the scene
   */
  public Iscene getScene(String name){
    Iscene returnScene = null;
    for(Iscene scene : sceneList){
      if (scene.getName().equals(name))
        returnScene = scene;
    }
    return returnScene;
View Full Code Here

Examples of org.mt4j.sceneManagement.Iscene

    cell.addGestureListener(TapProcessor.class, new IGestureEventListener() {
      public boolean processGestureEvent(MTGestureEvent ge) {
        TapEvent te = (TapEvent)ge;
        if (te.isTapped()){
          //System.out.println("Clicked cell: " + te.getTargetComponent());
          final Iscene scene = createScene.getNewScene();
             
          if (!switchDirectlyToScene){//We have FBO support -> show scene in a window first
           
            if (hasFBO && scene instanceof AbstractScene){
              ((AbstractScene) scene).setTransition(new BlendTransition(app, 300))
View Full Code Here

Examples of org.mt4j.sceneManagement.Iscene

    appToDestroy.invokeLater(new Runnable() {
     
      public void run() {
        Iscene[] scenes = appToDestroy.getScenes();
        for (int i = 0; i < scenes.length; i++) {
          Iscene iscene = scenes[i];
          if (!iscene.destroy()){
            iscene.getCanvas().destroy();
          }
        }
      }
    });
//    getMTApplication().exit();
View Full Code Here
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.