예제 #1
0
void CameraDefend::Update() {
	dotAngle += 5;
	if (dotAngle > 359)
		dotAngle = 0;

	Ghost* ghost = getGameState()->getGhost();

	if (ghost != NULL && ghost->isAttackDefendable() && !(ghost->getAttack() == NULL || ghost->getAttack()->isOver())) {
		if (!active) {
			reinit();
		}
		active = true;
		getFightTutorial()->triggerTutorial(TUTORIAL_DEFEND);
	} else {
		active = false;
	}
}