示例#1
0
    public void Rewarded()
    {
                #if UNITY_EDITOR
        fpsPlayerRef.hitPoints = fpsPlayerRef.maximumHitPoints;
        fpsPlayerRef.UpdateHPBar();
        fpsPlayerRef.invulnerable = true;
        if (resetPositionInDeath)
        {
            fpsPlayerTransform.position = originalPosition;
            fpsPlayerTransform.rotation = originalRotation;
            resetPositionInDeath        = false;
        }
        pause.DeactivateDeathCanvas();
        fpsPlayerRef.RemoveInvulnerability();
        fpsPlayerRef.ActivateADShield(5.0f);
        #endif


#if UNITY_ANDROID
        if (HZIncentivizedAd.IsAvailable())
        {
            HZIncentivizedAd.Show();
            fpsPlayerRef.invulnerable = true;
            fpsPlayerRef.hitPoints    = fpsPlayerRef.maximumHitPoints;
            fpsPlayerRef.UpdateHPBar();
            Analytics.CustomEvent("DeathVideo");
            if (resetPositionInDeath)
            {
                fpsPlayerTransform.position = originalPosition;
                fpsPlayerTransform.rotation = originalRotation;
                resetPositionInDeath        = false;
            }
            pause.DeactivateDeathCanvas();
            fpsPlayerRef.RemoveInvulnerability();
            fpsPlayerRef.ActivateADShield(5.0f);
            HZIncentivizedAd.Fetch();
        }
#endif
    }