예제 #1
0
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;

}
예제 #2
0
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";

}
예제 #3
0
void CCSkeleton::setAnimation (const char* animationName, bool loop) {
	AnimationState_setAnimationByName(state, animationName, loop);
}
예제 #4
0
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);
}