internal void Revive()
 {
     timeScalesComponent.gamePlayStopped = false;
     playerIdentifierComponent.GetComponent <HealthComponent>().Revive();
     if (playerRevivedEvent != null)
     {
         playerRevivedEvent();
     }
 }
 public void ButtonPressed()
 {
     if (!currency.CanAfford(CurrencyType.Gems, respawnCost))
     {
         IAP.OpenShopAsPopUp();
         return;
     }
     currency.Spend(CurrencyType.Gems, respawnCost);
     respawnCost  *= 2;
     costText.text = respawnCost.ToString();
     playerIdentifierComponent.GetComponent <PlayerReviveComponent>().Revive();
 }
示例#3
0
    private void HandleShowResult(ShowResult result)
    {
        switch (result)
        {
        case ShowResult.Finished:
            Debug.Log("The ad was successfully shown.");
            playerIdentifierComponent.GetComponent <PlayerReviveComponent>().Revive();
            break;

        case ShowResult.Skipped:
            Debug.Log("The ad was skipped before reaching the end.");
            break;

        case ShowResult.Failed:
            Debug.LogError("The ad failed to be shown.");
            break;
        }
    }