//Private Methods: private void UpdateGlobalFloat() { //get and increment score: float currentScore = Transmission.GetGlobalFloat(GlobalScoreKey); currentScore++; //set score: Transmission.SetGlobalFloat(GlobalScoreKey, currentScore); }
//Loops: private void Update() { string output = _initialInfo + System.Environment.NewLine; output += "Peers Available: " + Transmission.Peers.Length + System.Environment.NewLine; //only show the score if we have a value for it: if (Transmission.HasGlobalFloat(GlobalScoreKey)) { output += "Global Float: " + Transmission.GetGlobalFloat(GlobalScoreKey); } info.text = output; }