1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using UnityEngine;
- using System.Collections;
- public class AdManager : MonoBehaviour
- {
- public static AdManager Instance;
- private TimerAd BunnerAd;
- public int count;
- public Camera SmokeCam;
- public bool Active;
- void Start()
- {
- //PlayerPrefs.SetInt("Level",2);
- Instance = this;
-
- Adware.OnClose += () =>
- {
- //Show panels Back
- OnDone();
- };
- }
- public void PlayVideoAd()
- {
- AdManager.Instance.Active = true;
- //count++;
- if (SmokeCam != null)
- {
- SmokeCam.enabled = false;
- }
- if (/*count%2 ==0 && */Adware.Instance.Available)
- {
-
- Adware.Instance.Show(() => { });
- }
- else
- {
-
- }
- }
- public void OnDone()
- {
-
- }
- }
|