Examples of AudioComponent


Examples of com.sertaogames.cactus2d.components.AudioComponent

    Utils.offsetCorrection(initialPosition);
    DragAndDropComponent dd = new DragAndDropComponent();
    gameObject.transform.getLocalPosition().set(new Vector2(initialPosition).sub(new Vector2(sr.spriteRegion.getRegionWidth()/2
        ,sr.spriteRegion.getRegionHeight()/2)));
    gameObject.AddComponent(dd);
    gameObject.AddComponent(new AudioComponent("data/sound/drag.wav"));
    gameObject.AddComponent(new MyHomeComponent());
   
    addDinamicPhysicBySprite(gameObject);
    return gameObject;
  }
View Full Code Here

Examples of com.sertaogames.cactus2d.components.AudioComponent

    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);
    }
   
    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);
    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

Examples of com.sertaogames.cactus2d.components.AudioComponent

    subGameObject.AddComponent(new SpriteRendererComponent(null));
    TextureRegion[][] tmp = TextureRegion.split(tx, width, height);
    tmp = TextureRegion.split(tx, width, height);
    subGameObject.spriteRenderer.gui = true;
    subGameObject.AddComponent(new ButtonComponent(tmp[0][2], tmp[0][3]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new PauseComponent());
    gui.addGameObject(subGameObject);
   
    LabelComponent label = null;
    GameObject time = new GameObject("Time");
View Full Code Here

Examples of com.sertaogames.cactus2d.components.AudioComponent

    TextureRegion[][] tmp = TextureRegion.split(bt, width, height);
    go.transform.getLocalPosition().add(Gdx.graphics.getWidth()/2 - 128 * Cactus2DApplication.invCameraZoom, Gdx.graphics.getHeight()/2 - 64 * Cactus2DApplication.invCameraZoom);
    go.spriteRenderer.gui = true;
    go.AddComponent(new ButtonComponent(tmp[2][0],tmp[2][1]));
    go.AddComponent(new LevelLoader(MainLevel.class));
    go.AddComponent(new AudioComponent("data/sound/click.wav"));
    addGameObject(go);

    go = new GameObject("sound");
    tmp = TextureRegion.split(bt, 128, 128);
    go.AddComponent(new ButtonComponent(tmp[1][4],tmp[1][5]));
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.