Package com.sertaogames.cactus2d.components

Examples of com.sertaogames.cactus2d.components.AnimationComponent.play()


    AnimationComponent anim = new AnimationComponent();
    Texture tx  = new Texture(Gdx.files.internal("data/textures/sismoAnim.png"));
    int[] frames = { 0, 1, 2, 3, 4, 5, 6, 7};
    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);
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.