コード例 #1
0
        /// submit a score to the leaderboards,
        /// updating the client on a response
        static void SubmitScore(float time)
        {
            // The Leaderboards to submit our time to
            Leaderboards leaderboards = new Leaderboards();

            // The score to submit
            string ourName      = GamerTagManager.GetGamerTag();
            string theirName    = MultiPlayerController.Instance.theirName;
            int    tenthSeconds = ClockController.SecondsToTenthsOfSeconds(time);
            Score  score        = new Score(tenthSeconds, ourName, theirName);

            // Submit the time the the leaderboards, and send a message
            // to the client upon response
            leaderboards.SubmitScoreAsync(SceneManager.opts.level, score,
                                          delegate(SubmissionResponse r, ServerException e) {
                if (e != null)
                {
                    UILogger.Log(e.Message);
                }
                position    = (byte)r.position;
                positionSet = true;

                updateManager.SendLeaderboardsUpdate(position);
            });
        }
コード例 #2
0
        void Start()
        {
            // link components

            label = GetComponent <Text>();

            // find the game clock

            clock = FindObjectOfType <ClockController> ();
        }
コード例 #3
0
ファイル: StartLine.cs プロジェクト: matomatical/8bIT-Project
        void Start()
        {
            // link components together

            clock = FindObjectOfType <ClockController> ();
        }
コード例 #4
0
 void Start()
 {
     clock = FindObjectOfType <ClockController> ();
 }