public SinglePlayerMatchModeStructure(GameObject playerToSpawn, GamePlaySide playSide, GameDifficultyTypes gameDifficultyTypes, int maxScoreToWin)
 {
     this.playerToSpawn       = playerToSpawn;
     this.playSide            = playSide;
     this.gameDifficultyTypes = gameDifficultyTypes;
     this.maxScoreToWin       = maxScoreToWin;
 }
Example #2
0
        public static Difficulty FromType(GameDifficultyTypes gameType)
        {
            var diff = new Difficulty()
            {
                GameDifficulty = gameType
            };


            switch (diff.GameDifficulty)
            {
            case GameDifficultyTypes.EASY:
                diff.ShowChance   = 20d.PercOf(100);
                diff.ShowDuration = TimeSpan.FromSeconds(7);
                break;

            case GameDifficultyTypes.HARD:
                diff.ShowDuration     = TimeSpan.FromMilliseconds(800);
                diff.GameTickInterval = TimeSpan.FromMilliseconds(800);
                break;

            case GameDifficultyTypes.INSANE:
                diff.ShowDuration     = TimeSpan.FromMilliseconds(700);
                diff.GameTickInterval = TimeSpan.FromMilliseconds(700);
                break;

            case GameDifficultyTypes.NIGHTMARE:
                diff.ShowDuration     = TimeSpan.FromMilliseconds(600);
                diff.GameTickInterval = TimeSpan.FromMilliseconds(600);
                break;

            case GameDifficultyTypes.HELL:

                var ts = TimeSpan.FromMilliseconds(500);

                diff.ShowDuration     = ts;
                diff.MissDuration     = ts;
                diff.HitDuration      = ts;
                diff.GameTickInterval = ts;
                break;

            case GameDifficultyTypes.NORMAL:
            default:
                // Nothing, we're already set
                break;
            }


            return(diff);
        }