Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When we want to play the animations of the objects? #124

Open
ovicin opened this issue Jun 4, 2014 · 1 comment
Open

When we want to play the animations of the objects? #124

ovicin opened this issue Jun 4, 2014 · 1 comment
Labels

Comments

@ovicin
Copy link
Member

ovicin commented Jun 4, 2014

The code committed by me now plays the animation all the time but the game moves very slow because of this.

If we want to use animations in what moments we will want to play them?

Here are some code examples on how the animations are used:

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
    // pause all animations, so we can scrub through them manually.
    model.setPausedForAllAnimations(true);
    animationPosition = y / (float)ofGetHeight();
    bAnimateMouse = true;
}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
    // unpause animations when finished scrubbing.
    if(bAnimate) {
        model.setPausedForAllAnimations(false);
    }
    bAnimateMouse = false;
}
//--------------------------------------------------------------
void testApp::update(){
    model.update();

    if(bAnimateMouse) {
        model.setPositionForAllAnimations(animationPosition);
    }

    mesh = model.getCurrentAnimatedMesh(0);
}
@ovicin ovicin added the question label Jun 4, 2014
@kubamarkiewicz
Copy link
Contributor

solo disparamos la animacion en momento de colision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants