void Awake()
        {
            // Setting up scoring resources
            currentRoundScores = PlayersState.INSTANCE.gameScores.StartNewRound();
            PlayersState.INSTANCE.gameScoresAccumulator = (acc, current) => SimpleScore.Accumulate((SimpleScore)acc, (SimpleScore)current);

            AFEventManager.INSTANCE.AddListener(this);
            freeForAllSettings = (FreeForAllGameSettings)GameSettingsState.INSTANCE.GameModeSettings;
            Debug.Log("pointsToWin:" + freeForAllSettings.MaxScore);
            maxScore = freeForAllSettings.MaxScore;
        }
Example #2
0
 public static SimpleScore Accumulate(SimpleScore acc, SimpleScore current)
 {
     return(new SimpleScore(acc.playerColor, acc.playerNumber, acc.score + current.score));
 }