void Skulls::createSkulls() { skull.setup("assets/skull.atlas", "assets/skull.json", 0.7); AnimationState_setAnimationByName(skull.getState(), "bigskull", true); skullPos.x = -300; skullPos.y = ofGetHeight()/2; skull.setPosition(skullPos); startTime = ofGetElapsedTimeMillis(); spawnstartTime = ofGetElapsedTimeMillis(); randTime = 1000; }
void Dragon::createDragon() { dragon.setup("assets/dragon.atlas", "assets/dragon.json", 0.3); AnimationState_setAnimationByName(dragon.getState(), "fly", true); dragonPos.x = -500; dragonPos.y = 250; dragon.setPosition(dragonPos); startTime = ofGetElapsedTimeMillis(); spawnstartTime = ofGetElapsedTimeMillis(); randTime = 2000; GlobalData::enemyType = "dragon"; }
void CCSkeleton::setAnimation (const char* animationName, bool loop) { AnimationState_setAnimationByName(state, animationName, loop); }
void CCSkeletonAnimation::setAnimation (const char* name, bool loop, int stateIndex) { CCAssert(stateIndex >= 0 && stateIndex < (int)states.size(), "stateIndex out of range."); AnimationState_setAnimationByName(states[stateIndex], name, loop); }