public void HandleShowResult(ShowResult result) { switch (result) { case ShowResult.Finished: heart = GameObject.FindGameObjectWithTag("Hearts").GetComponent <Hearts>() as Hearts; heart.AddHeart(); Debug.Log("<color=green>The ad was skipped before reaching the end.</color>"); break; case ShowResult.Skipped: Debug.Log("<color=yellow>The ad was skipped before reaching the end.</color>"); break; case ShowResult.Failed: Debug.LogError("<color=red>The ad failed to be shown.</color>"); break; } }