Example #1
0
        public LevelOptionsInfo(NetIncomingMessage msg)
        {
            bool bit0 = msg.ReadBoolean();
            bool bit1 = msg.ReadBoolean();
            bool bit2 = msg.ReadBoolean();
            bool bit3 = msg.ReadBoolean();
            bool bit4 = msg.ReadBoolean();

            difficulty = (bit2 ? BeatmapDifficulty.ExpertPlus : (bit1 ? (bit0 ? BeatmapDifficulty.Expert : BeatmapDifficulty.Hard) : (bit0 ? BeatmapDifficulty.Normal : BeatmapDifficulty.Easy)));

            modifiers = new GameplayModifiersStruct();

            modifiers.songSpeed = (bit4 ? GameplayModifiers.SongSpeed.Slower : (bit3 ? GameplayModifiers.SongSpeed.Faster : GameplayModifiers.SongSpeed.Normal));

            modifiers.noFail             = msg.ReadBoolean();
            modifiers.noObstacles        = msg.ReadBoolean();
            modifiers.noBombs            = msg.ReadBoolean();
            modifiers.noArrows           = msg.ReadBoolean();
            modifiers.instaFail          = msg.ReadBoolean();
            modifiers.batteryEnergy      = msg.ReadBoolean();
            modifiers.disappearingArrows = msg.ReadBoolean();
            modifiers.ghostNotes         = msg.ReadBoolean();

            bool bit13 = msg.ReadBoolean();
            bool bit14 = msg.ReadBoolean();

            msg.ReadBoolean();

            characteristicName = bit14 ? (!bit13 ? "OneSaber" : string.Empty) : (bit13 ? "NoArrows" : "Standard");

            if (characteristicName == string.Empty)
            {
                characteristicName = msg.ReadString();
            }
        }
Example #2
0
 public LevelOptionsInfo(LevelOptionsInfo original)
 {
     difficulty         = original.difficulty;
     modifiers          = original.modifiers;
     characteristicName = original.characteristicName;
 }
Example #3
0
 public LevelOptionsInfo(BeatmapDifficulty difficulty, GameplayModifiers modifiers, string characteristicName)
 {
     this.difficulty         = difficulty;
     this.modifiers          = new GameplayModifiersStruct(modifiers);
     this.characteristicName = characteristicName;
 }