本文整理汇总了C++中Costume::setPosRotate方法的典型用法代码示例。如果您正苦于以下问题:C++ Costume::setPosRotate方法的具体用法?C++ Costume::setPosRotate怎么用?C++ Costume::setPosRotate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Costume
的用法示例。
在下文中一共展示了Costume::setPosRotate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
//.........这里部分代码省略.........
}
if (_leftTurnChore.isValid()) {
if (_walkedCur || _walkedLast)
_currTurnDir = 0;
if (_restChore.isValid()) {
if (_currTurnDir != 0) {
if (getTurnChore(_currTurnDir)->isPlaying() && _restChore.isPlaying()) {
_restChore.stop(true, 500);
}
} else if (_lastTurnDir != 0) {
if (!_walkedCur && getTurnChore(_lastTurnDir)->isPlaying()) {
_restChore.playLooping(true);
}
}
}
if (_lastTurnDir != 0 && _lastTurnDir != _currTurnDir) {
getTurnChore(_lastTurnDir)->stop(true);
}
if (_currTurnDir != 0 && _currTurnDir != _lastTurnDir) {
getTurnChore(_currTurnDir)->playLooping(true, 500);
}
} else {
_currTurnDir = 0;
}
// The rest chore might have been stopped because of a
// StopActorChore(nil). Restart it if so.
if (!_walkedCur && _currTurnDir == 0 && !_restChore.isPlaying()) {
_restChore.playLooping(true);
}
_walkedLast = _walkedCur;
_walkedCur = false;
_lastTurnDir = _currTurnDir;
_currTurnDir = 0;
// Update lip syncing
if (_lipSync) {
int posSound;
// While getPosIn60HzTicks will return "-1" to indicate that the
// sound is no longer playing, it is more appropriate to check first
if (g_grim->getSpeechMode() != GrimEngine::TextOnly && g_sound->getSoundStatus(_talkSoundName.c_str()))
posSound = g_sound->getPosIn60HzTicks(_talkSoundName.c_str());
else
posSound = -1;
if (posSound != -1) {
int anim = _lipSync->getAnim(posSound);
if (_talkAnim != anim) {
if (anim != -1) {
if (_talkChore[anim].isValid()) {
stopMumbleChore();
if (_talkAnim != -1) {
_talkChore[_talkAnim].stop();
}
// Run the stop_talk chore so that it resets the components
// to the right visibility.
stopTalking();
_talkAnim = anim;
_talkChore[_talkAnim].play();
} else if (_mumbleChore.isValid() && !_mumbleChore.isPlaying()) {
_mumbleChore.playLooping();
_talkAnim = -1;
}
} else {
stopMumbleChore();
if (_talkAnim != -1)
_talkChore[_talkAnim].stop();
_talkAnim = 0;
stopTalking();
}
}
}
}
frameTime = (uint)(frameTime * _timeScale);
for (Common::List<Costume *>::iterator i = _costumeStack.begin(); i != _costumeStack.end(); ++i) {
Costume *c = *i;
c->setPosRotate(_pos, _pitch, _yaw, _roll);
int marker = c->update(frameTime);
if (marker > 0) {
costumeMarkerCallback(marker);
}
}
for (Common::List<Costume *>::iterator i = _costumeStack.begin(); i != _costumeStack.end(); ++i) {
Costume *c = *i;
c->animate();
}
for (Common::List<Costume *>::iterator i = _costumeStack.begin(); i != _costumeStack.end(); ++i) {
Costume *c = *i;
c->moveHead(_lookingMode, _lookAtVector);
}
}