示例#1
0
    public void AddShakeToCamera()
    {
        GameCamera gcCam = GameInstance.Object.GetGameCamera();

        GAssert.Assert(null != gcCam, "Unable to get camera object from Game Instance!");

        float fAmount = 0.0f;

        switch (m_iAmount)
        {
        case Types.ECamShakeAmount._SMALL_ENEMY: fAmount = Types.s_fCAM_SmallEnemyShakeAmount; break;

        case Types.ECamShakeAmount._MID_ENEMY: fAmount = Types.s_fCAM_MedEnemyShakeAmount; break;

        case Types.ECamShakeAmount._LARGE_ENEMY: fAmount = Types.s_fCAM_LargeEnemyShakeAmount; break;

        case Types.ECamShakeAmount._PROJECTILE: fAmount = Types.s_fCAM_ProjectileShakeAmount; break;

        case Types.ECamShakeAmount._EMPLACEMENT: fAmount = Types.s_fCAM_EmplacementShakeAmount; break;
        }
        gcCam.AddShake(fAmount);
    }