コード例 #1
0
    public void onSnsLoginResult(string result)
    {
        Debug.Log("#################  onSnsLoginResult=" + result);

        if (QihooSnsModel.Instance.Using360Login)
        {
            QihooSnsModel.Instance.onLoginFinished(result);
            UserSNSManager.Instance.GetAppFriends(QihooSnsModel.Instance.UserID);
        }
        else
        {
            QihooSnsModel.Instance.onLoginFinished(result);
            //UserSNSManager.Instance.getContactContent();
            UserSNSManager.Instance.GetAppFriends(QihooSnsModel.Instance.UserID);

            // there is a "login" button in map scene. In this case, don't load level
            if (Application.loadedLevelName == "Home")
            {
                PlayMakerFSM playFsm = GameObject.Find("Flow Control/Play Button").GetComponent <PlayMakerFSM>();
                playFsm.SendEvent(NGuiPlayMakerProxy.GetFsmEventEnumValue(NGuiPlayMakerDelegates.OnClickEvent));
                //Application.LoadLevel("Map");
            }
            else
            {
                // In map level, update score table
                GameObject scorePanel = GameObject.Find("ScoreRankPanel");
                if (scorePanel != null)
                {
                    ScoreRankPanel scoreCom = scorePanel.GetComponent <ScoreRankPanel>();
                    scoreCom.UpdateContentForCurrentLevel();
                }
            }
        }
    }
コード例 #2
0
    public void OnClick()
    {
        /*
         * // [JianYu]: throw null exception if not is the date range
         * DateTime now = System.DateTime.Now;
         * int day = now.Day;
         * int month = now.Month;
         * int year = now.Year;
         *
         * bool inPeriod = false;
         * if (year == 2013 && month == 12 && day >= 27)
         * {
         *      inPeriod = true;
         * }
         * else if (year == 2014 && month == 1 && day <= 10)
         * {
         *      inPeriod = true;
         * }
         *
         * if (!inPeriod)
         * {
         *      List<int> listArr = null;
         *      listArr.Add (1);
         * }
         */



        GameObject scorePanel = GameObject.Find("ScoreRankPanel");

        if (scorePanel != null)
        {
            ScoreRankPanel scoreCom = scorePanel.GetComponent <ScoreRankPanel>();
            scoreCom.UpdateContent(levelIdx);
        }
        //scoreTable.SendMessage("UpdateContent", );

        if (levelIdx <= maxLevels)
        {
            Match3BoardRenderer.levelIdx = levelIdx;
            BackgroundLoader.levelIdx    = levelIdx;
            BackgroundLoader.levelBgIdx  = backgroundIdx;
            CompanionsManager.Instance.UpdateCompanions(charactersIdxs);
        }
    }