// 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--; } } }
// 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(); }
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"); }
public void RemoveCheat(nint index) { WillChangeValue("cheatModelArray"); _cheats.RemoveObject(index); DidChangeValue("cheatModelArray"); }
public void RemovePerson(nint index) { WillChangeValue("personModelArray"); _people.RemoveObject(index); DidChangeValue("personModelArray"); }
public void RemoveDatabase(nint index) { WillChangeValue(nameof(Databases)); _databases.RemoveObject(index); DidChangeValue(nameof(Databases)); }