Package com.sertaogames.cactus2d

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


    GameObject time = new GameObject("Time");
    label = new LabelComponent(" ");
    time.transform.getLocalPosition().add(100* Cactus2DApplication.invCameraZoom, 80* Cactus2DApplication.invCameraZoom);
    label.setFontName(TerremotoApplication.fontName);
    time.AddComponent(label);
    time.AddComponent(new SpriteRendererComponent(null));
    time.spriteRenderer.gui = true;
    gui.addGameObject(time);
   
    GameObject points = new GameObject("Points");
    label = new LabelComponent(" ");
View Full Code Here


   
    GameObject points = new GameObject("Points");
    label = new LabelComponent(" ");
    points.transform.getLocalPosition().add(300* Cactus2DApplication.invCameraZoom, 80* Cactus2DApplication.invCameraZoom);
    label.setFontName(TerremotoApplication.fontName);
    points.AddComponent(label);
    points.AddComponent(new SpriteRendererComponent(null));
    points.spriteRenderer.gui = true;
    gui.addGameObject(points);
   
    subGameObject = new GameObject("Clock");
View Full Code Here

    anim.addAnimation("anim", tx, 384, 192, frames, 5, false);
   
    anim.play("anim");
   
    animatedGO.AddComponent(anim);
    animatedGO.AddComponent(new SpriteRendererComponent(null));
    animatedGO.transform.getPosition().add(width/2 - 370/2, height/2 - 215/2);
    seismographGO.addGameObject(animatedGO);
   
    GameObject titleGO = new GameObject("title");
    titleGO.transform.getPosition().add(width/2 - 384/2, height/2 - 128/2);
View Full Code Here

    GameObject points = new GameObject("Points");
    label = new LabelComponent(" ");
    points.transform.getLocalPosition().add(300* Cactus2DApplication.invCameraZoom, 80* Cactus2DApplication.invCameraZoom);
    label.setFontName(TerremotoApplication.fontName);
    points.AddComponent(label);
    points.AddComponent(new SpriteRendererComponent(null));
    points.spriteRenderer.gui = true;
    gui.addGameObject(points);
   
    subGameObject = new GameObject("Clock");
    sprite = SpriteRendererComponent.getTextureRegion(tx, width, height, 6, 3);
View Full Code Here

    titleGO.transform.getPosition().add(width/2 - 384/2, height/2 - 128/2);
    width = 384;
    height = 128;
    TextureRegion[][] matriz2 = TextureRegion.split(texture, 384, 128);
     sr = new SpriteRendererComponent(null,matriz2[6][0]);
     titleGO.AddComponent(sr);
    seismographGO.addGameObject(titleGO);
   
    go = new GameObject("play");
    go.AddComponent(new SpriteRendererComponent(null));
   
View Full Code Here

    /** Posiscionamento do game object no meio da tela */
    go.transform.getPosition().set(Gdx.graphics.getWidth()/2-256f*zoomScale,Gdx.graphics.getHeight()/2-128f*zoomScale);
   
    /** Aqui dizemos que ele vai ser desenhado na tela com  a marca */
    SpriteRendererComponent sr = new SpriteRendererComponent(Cactus2DApplication.loadTexture("data/textures/SertaoGames-marca-512x256.png"));
    go.AddComponent(sr);
   
    /** Aqui dizemos que o game object faz parte da GUI */
    sr.gui = true;
   
    /** Aqui incluimos os componentes que representam comportamentos*/
 
View Full Code Here

   
    /** Aqui dizemos que o game object faz parte da GUI */
    sr.gui = true;
   
    /** Aqui incluimos os componentes que representam comportamentos*/
    go.AddComponent(new SplashTouch()); // Torna o level toc�vel
    go.AddComponent(new LevelLoader(MenuLevel.class));// Ao fim deste l�vel, cassega o pr�ximo
    addGameObject(go);// Adciona o game object ao level
    }

}
View Full Code Here

    /** Aqui dizemos que o game object faz parte da GUI */
    sr.gui = true;
   
    /** Aqui incluimos os componentes que representam comportamentos*/
    go.AddComponent(new SplashTouch()); // Torna o level toc�vel
    go.AddComponent(new LevelLoader(MenuLevel.class));// Ao fim deste l�vel, cassega o pr�ximo
    addGameObject(go);// Adciona o game object ao level
    }

}
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.