void ShowEffCanNotGetReward() { countDownShakeController.SetUpShakeWorldPoint(0.2f); LeanTween.scale(txtCountDown.gameObject, Vector3.one * 1.2f, 0.2f).setLoopPingPong(1).setEase(LeanTweenType.easeOutBack); LeanTween.colorText(txtCountDown.rectTransform, Color.red, 0.2f).setLoopPingPong(1).setEase(LeanTweenType.easeOutBack); CoreGameManager.instance.DoVibrate(); MyAudioManager.instance.PlaySfx(GetGoldScreenController.instance.sfx_NotThisTime); }
public void OnClicked() { if (!GetGoldScreenController.instance.canTouch) { return; } if (((GetGoldScreen_PanelInstallApp_Controller)GetGoldScreenController.instance.panelInstallApp).timeCanPressGetReward > System.DateTime.Now) { return; } if (appDetail == null) { return; } ((GetGoldScreen_PanelInstallApp_Controller)GetGoldScreenController.instance.panelInstallApp).timeCanPressGetReward = System.DateTime.Now.AddSeconds(0.5f); MyAudioManager.instance.PlaySfx(GameInformation.instance.globalAudioInfo.sfx_Click); if (appDetail.currentState == InstallAppDetail.State.None) { if (!MyConstant.IsAppInstalled(appDetail.packageName)) { string _url = string.Empty; #if UNITY_ANDROID _url = "market://details?id=" + appDetail.packageName; #elif UNITY_IOS //TODO: setup URL cho mở app trên IOS _url = "itms-apps://itunes.apple.com/app/id" + appDetail.packageName; #endif if (!string.IsNullOrEmpty(_url)) { Application.OpenURL(_url); checkAppInstallOrNot = true; } } else { appDetail.StartChecking(); if (appDetail.myOriginalDetail != null) { appDetail.myOriginalDetail.StartChecking(); } RefreshData(); } } else if (appDetail.currentState == InstallAppDetail.State.Checking) { if (!appDetail.CanRecieveReward()) { countDownShakeController.SetUpShakeWorldPoint(0.2f); LeanTween.scale(txtReward_CountDown.gameObject, Vector3.one * 1.1f, 0.2f).setLoopPingPong(1).setEase(LeanTweenType.easeOutBack); LeanTween.colorText(txtReward_CountDown.rectTransform, Color.red, 0.2f).setLoopPingPong(1).setEase(LeanTweenType.easeOutBack); CoreGameManager.instance.DoVibrate(); MyAudioManager.instance.PlaySfx(GetGoldScreenController.instance.sfx_NotThisTime); return; } appDetail.RecieveReward(() => { GetGoldScreenController.instance.RefreshMyGoldInfo(false); if (HomeManager.instance != null && HomeManager.instance.myCallbackManager != null && HomeManager.instance.myCallbackManager.onLoadDataGoldGemFinished != null) { HomeManager.instance.myCallbackManager.onLoadDataGoldGemFinished(); } }, () => { if (panelInstallApp != null) { panelInstallApp.ClearAndCreateNewPanelAppInfo(appDetail); } }); } }