Package com.sertaogames.cactus2d

Examples of com.sertaogames.cactus2d.GameObject.AddComponent()


    GameObject subGameObject = new GameObject("Continue");
    subGameObject.transform.getLocalPosition().add(width * 0.7f* Cactus2DApplication.invCameraZoom, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    TextureRegion[][] tmp = TextureRegion.split(tx, 128, 128);
    subGameObject.AddComponent(new ButtonComponent(tmp[0][0], tmp[0][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new NextstateComponent(newState));
    if(GameControllerComponent.state != GameState.WON && GameControllerComponent.state != GameState.LOST){
      tip.addGameObject(subGameObject);
    }
View Full Code Here


    subGameObject.transform.getLocalPosition().add(width * 0.7f* Cactus2DApplication.invCameraZoom, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    TextureRegion[][] tmp = TextureRegion.split(tx, 128, 128);
    subGameObject.AddComponent(new ButtonComponent(tmp[0][0], tmp[0][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new NextstateComponent(newState));
    if(GameControllerComponent.state != GameState.WON && GameControllerComponent.state != GameState.LOST){
      tip.addGameObject(subGameObject);
    }
   
View Full Code Here

    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    TextureRegion[][] tmp = TextureRegion.split(tx, 128, 128);
    subGameObject.AddComponent(new ButtonComponent(tmp[0][0], tmp[0][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new NextstateComponent(newState));
    if(GameControllerComponent.state != GameState.WON && GameControllerComponent.state != GameState.LOST){
      tip.addGameObject(subGameObject);
    }
   
    subGameObject = new GameObject("Reload");
View Full Code Here

      tip.addGameObject(subGameObject);
    }
   
    subGameObject = new GameObject("Reload");
    subGameObject.transform.getLocalPosition().add(10, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[1][0], tmp[1][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MainLevel.class));
    tip.addGameObject(subGameObject);
View Full Code Here

   
    subGameObject = new GameObject("Reload");
    subGameObject.transform.getLocalPosition().add(10, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[1][0], tmp[1][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MainLevel.class));
    tip.addGameObject(subGameObject);

    subGameObject = new GameObject("Menu");
View Full Code Here

    subGameObject = new GameObject("Reload");
    subGameObject.transform.getLocalPosition().add(10, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[1][0], tmp[1][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MainLevel.class));
    tip.addGameObject(subGameObject);

    subGameObject = new GameObject("Menu");
    subGameObject.transform.getLocalPosition().add(width * 0.35f * Cactus2DApplication.invCameraZoom, 0);
View Full Code Here

    subGameObject.transform.getLocalPosition().add(10, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[1][0], tmp[1][1]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MainLevel.class));
    tip.addGameObject(subGameObject);

    subGameObject = new GameObject("Menu");
    subGameObject.transform.getLocalPosition().add(width * 0.35f * Cactus2DApplication.invCameraZoom, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
View Full Code Here

    subGameObject.AddComponent(new LevelLoader(MainLevel.class));
    tip.addGameObject(subGameObject);

    subGameObject = new GameObject("Menu");
    subGameObject.transform.getLocalPosition().add(width * 0.35f * Cactus2DApplication.invCameraZoom, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[0][6], tmp[0][7]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MenuLevel.class));
    tip.addGameObject(subGameObject);
View Full Code Here

    subGameObject = new GameObject("Menu");
    subGameObject.transform.getLocalPosition().add(width * 0.35f * Cactus2DApplication.invCameraZoom, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[0][6], tmp[0][7]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MenuLevel.class));
    tip.addGameObject(subGameObject);
   

View Full Code Here

    subGameObject = new GameObject("Menu");
    subGameObject.transform.getLocalPosition().add(width * 0.35f * Cactus2DApplication.invCameraZoom, 0);
    subGameObject.AddComponent(new SpriteRendererComponent(null));
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[0][6], tmp[0][7]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new LevelLoader(MenuLevel.class));
    tip.addGameObject(subGameObject);
   

    l.alignment = HAlignment.CENTER;
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.