Beispiel #1
0
 private void SetScore(ScoreData scoreData)
 {
     if(scoreData.Player.id == SlotNumber)
     {
         _score = scoreData.Score;
     }
 }
Beispiel #2
0
 private void ListenScores(ScoreData data)
 {
     int key = data.Player.id;
     if (scores.ContainsKey(key))
     {
         scores[key] = data.Score;
     }
     else
     {
         scores.Add(key, data.Score);
     }
 }
Beispiel #3
0
        public void Update()
        {
            PuffynessTarget = Mathf.Max(MinPuffyness, PuffynessTarget - (PuffynessDecayRate * Time.deltaTime));
            Puffyness = Mathf.SmoothDamp(Puffyness, PuffynessTarget, ref PuffynessV, PuffynessDampTime);
            Score = Mathf.Max(0, Score - (GetScoreDecayRate() * PuffynessDecayMulti));

            if(player != null)
            {
                ScoreData data = new ScoreData()
                {
                    Player = player,
                    Score = this.Score
                };
                ThePigeonSignals.SetPigeonScore.Dispatch(data);
            }
        }