INNER CODE UNIT · C++
velocity
camila314/gdp · GJBaseGameLayer/GJBaseGameLayer_update.cpp:128
CCPoint velocity = m_player1->getPosition() - m_player1->getLastPosition();
if (m_playerDied) {
velocity = ccp(0, 0);
} else if (physicsSecond * 16.0 < ABS(velocity.y - m_player1->m_yVelocity)) {
velocity.y = 0;
}
m_effectManager->m_playerVelocity = velocity;
m_effectManager->m_cameraVelocity = ccp(-m_cameraVelocity.x, -m_cameraVelocity.y);
m_effectManager->m_p1RotVelocity = m_player1->getRotation() - m_player1->m_prevRotation;
m_effectManager->m_p2RotVelocity = m_player2->getRotation() - m_player2->m_prevRotation;
m_effectManager->updateTimers(physicsDelta, m_timewarp);
m_effectManager->prepareMoveActions(physicsDelta, stepIter < stepCount - 1);
m_effectManager->processMoveActionsStep(physicsDelta, stepIter == stepCount - 1);
m_effectManager->postMoveActions();