public void showRewardedVideo() { if (rewardBasedVideo.IsLoaded()) { rewardBasedVideo.Show(); } else { if (!AndroidNativePlugin.IsInternetConnected() && !AndroidNativePlugin.IsWifiConnected() && !AndroidNativePlugin.IsMobileConnected()) { GameManager.Instance.setGameState(GameState.States.InternetNotConnected); } else { GameManager.Instance.setGameState(GameState.States.AdNotAvaiableState); } RequestRewardedVideo(); } }
public void onFreeCoinsBtnClick() { if (Application.platform.Equals(RuntimePlatform.Android)) { if (AndroidNativePlugin.IsInternetConnected() || AndroidNativePlugin.IsWifiConnected() || AndroidNativePlugin.IsMobileConnected()) { GameManager.Instance.setGameState(GameState.States.VideoAdConfirmation); GameManager.Instance.soundState.playSound(SoundController.States.BTNCLICKSOUND); } else { GameManager.Instance.setGameState(GameState.States.InternetNotConnected); GameManager.Instance.soundState.playSound(SoundController.States.BTNCLICKSOUND); } } else { GameManager.Instance.setGameState(GameState.States.VideoAdConfirmation); GameManager.Instance.soundState.playSound(SoundController.States.BTNCLICKSOUND); } }