Ejemplo n.º 1
0
 protected override void AfterTween()
 {
     panelTransformationController.InitPTController();
     // miniMapController.InitMiniMap();
     dragController.GameOverFlag    = false;
     dragController.GeneralDragFlag = false;
     SDKMgr.GetInstance().Track(SDKMsgType.OnLevelEnter, (int)levelID);
 }
Ejemplo n.º 2
0
 public void showRewardVideo(Action onReward, Action onFail, Action onClose)
 {
     if (isPaid())
     {
         onReward();
         return;
     }
     SDKMgr.GetInstance().showRewardVideo(onReward, onFail, onClose);
 }
Ejemplo n.º 3
0
 public void Pay4RemoveAD()
 {
     if (isPaying)
     {
         //todo 此处应该有tips
         return;
     }
     isPaying = true;
     SDKMgr.GetInstance().pay4RemoveAd();
 }
Ejemplo n.º 4
0
    public bool CheckOver()
    {
        foreach (int i in playout)
        {
            if (i == (int)GridType.Blank)
            {
                return(false);
            }
        }
        uint curLevelID = LevelMgr.GetInstance().CurLevelID;

        XPlayerPrefs.DelRec(curLevelID);
        SDKMgr.GetInstance().Track(SDKMsgType.OnLevelClear, (int)curLevelID);
        return(true);
    }
Ejemplo n.º 5
0
    public void InterstitialTrigger(Action onReward = null, Action onFail = null, Action onClose = null)
    {
        if (isPaid())
        {
            if (onReward != null)
            {
                onReward();
            }
            return;
        }
        tmpCount = XPlayerPrefs.GetInt("StartUpCount");
        //int startUpCount = XPlayerPrefs.GetInt("StartUpCount");
        if (startUpCount != tmpCount)
        {
            startUpCount = tmpCount;
            Debug.Log("StartUpCount" + startUpCount);
            if (startUpCount > config.Params1[config.Params1.Count - 1])
            {
                index = config.Params1.Count - 1;
            }
            else
            {
                index = config.Params1.IndexOf(startUpCount);
            }
            Debug.Log("first" + index);
            playTimes = config.Params2[index];
        }
        if (playTimes == 0)
        {
            playTimes = config.Params3[index];
        }
        playTimes--;
        Debug.Log("playTimes" + playTimes);
        if (playTimes == 0)
        {
            //TODO:播放广告
            SDKMgr.GetInstance().showIntersitialAD(onReward, onFail, onClose);

#if UNITY_EDITOR
            Debug.Log("激励广告");
#endif
        }
    }
Ejemplo n.º 6
0
    public override void OnExit(params object[] argv)
    {
        GameObject nextLevelButton = argv[0] as GameObject;

        nextLevelButton.SetActive(true);
        X.Res.FuncParamConfig config = FuncMgr.GetInstance().GetConfigByID(1);
        if (config != null)
        {
            uint curlevelid = LevelMgr.GetInstance().CurLevelID;
            //int showcount = XPlayerPrefs.GetInt(Evaluation_Tag);
            for (int i = 0; i < config.Params1.Count; i++)
            {
                if (config.Params1[i] == curlevelid /*&& config.Params2[i] > showcount*/)
                {
                    SDKMgr.GetInstance().Track(SDKMsgType.OnCallEvaluation);
                    //showcount++;
                    //XPlayerPrefs.SetInt(Evaluation_Tag, showcount);
                    return;
                }
            }
        }
    }
Ejemplo n.º 7
0
 public bool isRewardVideoReady()
 {
     return(SDKMgr.GetInstance().isRewardVideoReady());
 }
Ejemplo n.º 8
0
 public void SetUp()
 {
     GameConfig.Language = SDKMgr.GetInstance().GetSystemLang();
 }