public void OnCLick() { bool ready = false; switch (style) { case BTN_STYLE.ShowVideo: ready = ADFlyHiSDK.isVideoReady(); Debug.Log(ready); if (ready) { ADFlyHiSDK.ShowVideo(); } break; case BTN_STYLE.ShowFullScreen: ready = ADFlyHiSDK.isFullScreenReady(); Debug.Log(ready); if (ready) { ADFlyHiSDK.ShowFullScreen(); } break; } }
void Update() { t++; if (t > 30) { t = 0; if (ADFlyHiSDK.isVideoReady()) { GetComponent <Image>().color = new Color(1, 1, 1); // if (PlayerPrefs.HasKey("language")) // { if (PlayerPrefs.GetInt("language") == 0) { //中文 text1.text = "填充完毕"; } else { //英文 text1.text = "Ready"; } // } } else { GetComponent <Image>().color = new Color(0.6f, 0.6f, 0.6f); // if (PlayerPrefs.HasKey("language")) // { if (PlayerPrefs.GetInt("language") == 0) { //中文 text1.text = "正在填充..."; } else { //英文 text1.text = "loading..."; } // } } } }
public void Ads() { if (ADFlyHiSDK.isVideoReady()) { // text1.text = "播放成功"; ADFlyHiSDK.ShowVideo(); } else { if (PlayerPrefs.GetInt("language") == 0) { //中文 text1.text = "正在填充..."; } else { //英文 text1.text = "loading..."; } } }