예제 #1
0
	void HexagonGame::updateRotation(float mFT)
	{
		auto nextRotation(getRotationSpeed() * 10.f);
		if(status.fastSpin > 0)
		{
			nextRotation += abs((getSmootherStep(0, levelStatus.fastSpin, status.fastSpin) / 3.5f) * 17.f) * getSign(nextRotation);
			status.fastSpin -= mFT;
		}

		backgroundCamera.turn(nextRotation);
	}
예제 #2
0
inline void HexagonGame::updateRotation(float mFrameTime)
{
    auto nextRotation = getRotationSpeed() * 10 * mFrameTime;
    if(rotationDirection) nextRotation *= -1;
    if(fastSpin > 0)
    {
        nextRotation += (getSmootherStep(0, 85, fastSpin) / 3.5f) * getSign(nextRotation) * mFrameTime * 17.0f;
        fastSpin -= mFrameTime;
    }

    gameSprite.rotate(nextRotation);
}