예제 #1
0
 // Attempt to resubmit the scoress
 public void resubmitSotredScores()
 {
     if (GKLocalPlayer.LocalPlayer.Authenticated && storedScores.Count != 0)
     {
         int index = (int)storedScores.Count - 1;
         while (index >= 0)
         {
             GKScore score = new GKScore(storedScores.ValueAt((uint)index));
             score.ShouldSetDefaultLeaderboard = true;
             if (score == null)
             {
                 return;
             }
             score.ReportScore(new GKNotificationHandler((error) =>
             {
                 if (error == null)
                 {
                     new UIAlertView("Score Submitted", "Score submitted successfully ", null, "OK", null).Show();
                 }
                 else
                 {
                     this.storeScore(score);
                     new UIAlertView("Score Stored", "Score Stored ", null, "OK", null).Show();
                 }
             }));
             storedScores.RemoveObject(index);
             index--;
         }
     }
 }
예제 #2
0
 // Attempt to resubmit the scoress
 public void resubmitSotredScores()
 {
     if (GKLocalPlayer.LocalPlayer.Authenticated && storedScores.Count != 0)
     {
         nuint index = storedScores.Count - 1;
         while (index >= 0)
         {
             var score = storedScores.GetItem <GKScore> (index);
             score.ShouldSetDefaultLeaderboard = true;
             if (score == null)
             {
                 return;
             }
             score.ReportScore(new Action <NSError> ((error) => {
                 if (error == null)
                 {
                     new UIAlertView("Score Submitted", "Score submitted successfully ", null, "OK", null).Show();
                 }
                 else
                 {
                     this.storeScore(score);
                     new UIAlertView("Score Stored", "Score Stored ", null, "OK", null).Show();
                 }
             }));
             storedScores.RemoveObject((nint)index);
             index--;
         }
     }
 }
        public void Unsubscribe(string topic)
        {
            if (!connected)
            {
                pendingTopics.Enqueue(new Tuple <string, bool>(topic, false));
                return;
            }
            var deletedKey = new NSString($"{topic}");

            if (currentTopics.Contains(deletedKey))
            {
                Messaging.SharedInstance.Unsubscribe($"/topics/{topic}");
                nint idx = (nint)currentTopics.IndexOf(deletedKey);
                if (idx != -1)
                {
                    currentTopics.RemoveObject(idx);
                }
            }
            NSUserDefaults.StandardUserDefaults.SetValueForKey(currentTopics, FirebaseTopicsKey);
            NSUserDefaults.StandardUserDefaults.Synchronize();
        }
예제 #4
0
        public void RemoveChild(TestListNode child)
        {
            WillChangeValue("isLeaf");
            WillChangeValue("childNodes");

            InitializeChildren();

            var length = children.Count;

            for (nuint i = 0; i < length; i++)
            {
                if (children.GetItem <TestListNode> (i) == child)
                {
                    children.RemoveObject((nint)i);
                    break;
                }
            }

            child.parent = null;

            DidChangeValue("isLeaf");
            DidChangeValue("childNodes");
        }
예제 #5
0
 public void RemoveCheat(nint index)
 {
     WillChangeValue("cheatModelArray");
     _cheats.RemoveObject(index);
     DidChangeValue("cheatModelArray");
 }
예제 #6
0
 public void RemovePerson(nint index)
 {
     WillChangeValue("personModelArray");
     _people.RemoveObject(index);
     DidChangeValue("personModelArray");
 }
예제 #7
0
 public void RemoveDatabase(nint index)
 {
     WillChangeValue(nameof(Databases));
     _databases.RemoveObject(index);
     DidChangeValue(nameof(Databases));
 }