You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Scripts/Dev/ReviveOnClick.cs

47 lines
880 B
C#

using System.Collections;
using System.Collections.Generic;
using D2D.UI;
using D2D.Utilities;
using UnityEngine;
public class ReviveOnClick : DButtonListener
{
[SerializeField] private bool _isButton;
public bool Was { get; set; }
private bool _isClaimClickMissed;
//private void Update()
//{
// if (!_isButton && DInput.IsMouseReleased)
// OnClick();
//}
protected override void OnClick()
{
if (Was)
return;
Was = true;
Debug.Log("OnClick()");
ShowRewardedAd();
}
public void OnClicker()
{
if (!Was)
{
Was = true;
Debug.Log("OnClick()");
ShowRewardedAd();
}
}
private void ShowRewardedAd()
{
AdsManager.Instance.ShowRewardedAd(RewardedTypes.Revive);
}
}