예제 #1
0
 public void Copy(object reference)
 {
     var castedReference = (AudioDynamicData)reference;
     PlayMode = castedReference.PlayMode;
     Delay = castedReference.Delay;
     OnInitialize = castedReference.OnInitialize;
 }
예제 #2
0
 /// <summary>
 /// Начать игру с N количеством игроков
 /// </summary>
 /// <param name="maxUsers"></param>
 void Play(PlayModes playMode)
 {
     ISFSObject data = new SFSObject();
     data.PutUtfString("playMode", Util.EnumToStr(playMode));
     data.PutUtfString("nickName", IOL.Instance.UserNick);
     SendToLastJoinedRoom(Reqeusts.Play, data);
 }
예제 #3
0
        internal static Score Create(PlayModes playMode, string name = null, Beatmap beatmap = null, bool useNewScoring = false)
        {
            switch (playMode)
            {
            case PlayModes.CatchTheBeat:
                return(new ScoreFruits(beatmap, name));

            case PlayModes.Taiko:
                return(new ScoreTaiko(beatmap, name));

            case PlayModes.OsuMania:
                return(new ScoreMania(beatmap, name));

            default:
                if (Player.IsTargetPracticeMode)
                {
                    return(new ScoreTarget(beatmap, name));
                }
                else
                {
                    Score s = new Score(beatmap, name);
                    if (useNewScoring)
                    {
                        s.Processor = new ScoreProcessor(s);
                    }
                    return(s);
                }
            }
        }
예제 #4
0
        public bMatch(MatchTypes matchType, MatchScoringTypes matchScoringType, MatchTeamTypes matchTeamType, PlayModes playMode, string gameName,
                      string gamePassword, int initialSlotCount, string beatmapName, string beatmapChecksum, int beatmapId, Mods activeMods, int hostId,
                      MultiSpecialModes specialModes = MultiSpecialModes.None, int seed = 0)
        {
            this.matchType        = matchType;
            this.playMode         = playMode;
            this.matchScoringType = matchScoringType;
            this.matchTeamType    = matchTeamType;
            this.gameName         = gameName;
            this.gamePassword     = gamePassword;
            this.beatmapName      = beatmapName;
            this.beatmapChecksum  = beatmapChecksum;
            this.beatmapId        = beatmapId;
            this.activeMods       = activeMods;
            this.hostId           = hostId;
            this.specialModes     = specialModes;
            this.Seed             = seed;

            SendPassword = true;

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotStatus[i] = i < initialSlotCount ? SlotStatus.Open : SlotStatus.Locked;
                slotId[i]     = -1;
            }

            if (gameName.Length > 50)
            {
                gameName = gameName.Remove(50);
            }
        }
예제 #5
0
 public bMatchData(MatchTypes matchType, MatchScoringTypes matchScoringType,
                   MatchTeamTypes matchTeamType, PlayModes playMode, string gameName, string gamePassword, int maxSlots,
                   string beatmapName, string beatmapChecksum, int beatmapId, Mods activeMods, int hostId, MultiSpecialModes multiSpecialMode,
                   int Seed)
 {
     this.matchType        = matchType;
     this.playMode         = playMode;
     this.matchScoringType = matchScoringType;
     this.matchTeamType    = matchTeamType;
     this.gameName         = gameName;
     this.gamePassword     = gamePassword;
     this.beatmapName      = beatmapName;
     this.beatmapChecksum  = beatmapChecksum;
     this.beatmapId        = beatmapId;
     this.activeMods       = activeMods;
     this.hostId           = hostId;
     this.specialModes     = multiSpecialMode;
     this.Seed             = Seed;
     this.SendPassword     = true;
     for (var i = 0; i < MaxRoomPlayers; i++)
     {
         slotStatus[i] = ((i < maxSlots) ? SlotStatus.Open : SlotStatus.Locked);
         slotId[i]     = -1;
     }
     if (gameName.Length > 50)
     {
         this.gameName = gameName.Remove(50);
     }
 }
예제 #6
0
        public bUserPresence(SerializationReader sr)
        {
            userId = sr.ReadInt32();
            if (userId < 0)
            {
                userId = -userId;
            }
            else
            {
                isOsu = userId != 0;
            }

            username = sr.ReadString();

            timezone    = sr.ReadByte() - 24;
            countryCode = sr.ReadByte();

            byte b = sr.ReadByte();

            permission = (Permissions)(b & ~0xe0);
            playMode   = (PlayModes)Math.Max((byte)0, Math.Min((byte)3, ((b & 0xe0) >> 5)));

            longitude = sr.ReadSingle();
            latitude  = sr.ReadSingle();
            rank      = sr.ReadInt32();
        }
예제 #7
0
        private void LoadConfig()
        {
            Check();
            try
            {
                XmlDocument readDoc = new XmlDocument();
                readDoc.Load(this.ConfigXmlPath);
                XmlNode rootNode = readDoc.SelectSingleNode("Root");

                XmlElement ValueElement = (XmlElement)rootNode.SelectSingleNode("Volume");
                string     valueStr     = ValueElement.Attributes["Value"].Value;
                this.volumeTrackBar.Value = float.Parse(valueStr);


                XmlElement PlayModeElement = (XmlElement)rootNode.SelectSingleNode("PlayMode");
                this.PlayMode = (PlayModes)int.Parse(PlayModeElement.Attributes["Value"].Value);

                XmlElement OpenStartElement = (XmlElement)rootNode.SelectSingleNode("OpenStart");
                this.ucCheckBox_OpenStart.Checked = bool.Parse(OpenStartElement.Attributes["CheckValue"].Value);


                XmlElement CloseTimeElement = (XmlElement)rootNode.SelectSingleNode("TimeClose");
                this.ucCheckBox_CloseTime.Checked = bool.Parse(CloseTimeElement.Attributes["CheckValue"].Value);
                this.dateTimePicker1.Value        = DateTime.Parse(CloseTimeElement.Attributes["TimeValue"].Value);
            }
            catch (Exception ex)
            {
                if (File.Exists(this.ConfigXmlPath))
                {
                    File.Delete(this.ConfigXmlPath);
                }
                Check();
                MessageBox.Show(ex.Message);
            }
        }
예제 #8
0
        public void Copy(object reference)
        {
            var castedReference = (AudioDynamicData)reference;

            PlayMode     = castedReference.PlayMode;
            Delay        = castedReference.Delay;
            OnInitialize = castedReference.OnInitialize;
        }
예제 #9
0
 public Player(string token, DataRow dbRow)
 {
     Token       = token;
     Id          = (int)dbRow["id"];
     Username    = (string)dbRow["username"];
     Tags        = (UserTags)(int)dbRow["tags"];
     currentMode = (PlayModes)(sbyte)dbRow["last_played_mode"];
 }
예제 #10
0
    void Awake()
    {
        if (RESET)
        {
            PlayerPrefs.DeleteAll();
        }

#if UNITY_ANDROID
        // isAndroid = true;
#endif
        //  Cursor.visible = false;

        if (FORCE_LOCAL_SCORE > 0)
        {
            PlayerPrefs.SetInt("scoreLevel_1", FORCE_LOCAL_SCORE);
        }


        if (!mInstance)
        {
            mInstance = this;
        }
        else
        {
            Destroy(this.gameObject);
            return;
        }
        DontDestroyOnLoad(this);

        if (LevelDataDebug.Instance)
        {
            playMode = PlayModes.STORYMODE;
            DEBUG    = LevelDataDebug.Instance.isDebbug;
            this.isArcadeMultiplayer = LevelDataDebug.Instance.isArcadeMultiplayer;
            this.playOnlyBosses      = LevelDataDebug.Instance.playOnlyBosses;
            this.playMode            = LevelDataDebug.Instance.playMode;
            this.forceVideogameID    = LevelDataDebug.Instance.videogameID;
            this.forceMissionID      = LevelDataDebug.Instance.missionID;
            this.testAreaName        = LevelDataDebug.Instance.testArea;
        }

        events                  = GetComponent <Events>();
        missions                = GetComponent <Missions>();
        multiplayerData         = GetComponent <MultiplayerData>();
        videogamesData          = GetComponent <VideogamesData> ();
        inputSaver              = GetComponent <InputSaver> ();
        inputSavedAutomaticPlay = GetComponent <InputSavedAutomaticPlay> ();
        versusManager           = GetComponent <VersusManager> ();
        handWriting             = GetComponent <HandWriting> ();
        texts = GetComponent <Texts> ();

        // GetComponent<Tracker>().Init();
        GetComponent <CurvedWorldManager>().Init();

        voicesManager.Init();

        events.SetVolume += SetVolume;
    }
예제 #11
0
 // Token: 0x06000E12 RID: 3602
 // RVA: 0x0000EA0A File Offset: 0x0000CC0A
 public Class12(bStatus bStatus_1, bool bool_0, string string_2, string string_3, int int_1, Mods mods_1, PlayModes playModes_1)
 {
     this.bStatus_0 = bStatus_1;
     this.string_0 = string_3;
     this.string_1 = string_2;
     this.mods_0 = mods_1;
     this.playModes_0 = playModes_1;
     this.int_0 = int_1;
 }
예제 #12
0
 internal ClientSideMatch(MatchTypes matchType, MatchScoringTypes matchScoringType, MatchTeamTypes matchTeamType,
                          PlayModes playMode, string gameName, string gamePassword, int initialSlotCount,
                          string beatmapName, string beatmapChecksum, int beatmapId, Mods activeMods, int hostId, MultiSpecialModes specialModes, int seed)
     : base(
         matchType, matchScoringType, matchTeamType, playMode, gameName, gamePassword, initialSlotCount,
         beatmapName, beatmapChecksum, beatmapId, activeMods, hostId, specialModes, seed)
 {
     SendPassword = true;
 }
예제 #13
0
        internal static bool CheckValidPlayKey(Keys k, PlayModes Mode)
        {
            switch (Mode)
            {
            case PlayModes.Osu:
                if (k == For(Bindings.OsuLeft))
                {
                    return(true);
                }
                if (k == For(Bindings.OsuRight))
                {
                    return(true);
                }
                break;

            case PlayModes.Taiko:
                if (k == For(Bindings.TaikoInnerLeft))
                {
                    return(true);
                }
                if (k == For(Bindings.TaikoInnerRight))
                {
                    return(true);
                }
                if (k == For(Bindings.TaikoOuterLeft))
                {
                    return(true);
                }
                if (k == For(Bindings.TaikoOuterRight))
                {
                    return(true);
                }
                break;

            case PlayModes.CatchTheBeat:
                if (k == For(Bindings.FruitsLeft))
                {
                    return(true);
                }
                if (k == For(Bindings.FruitsRight))
                {
                    return(true);
                }
                if (k == For(Bindings.FruitsDash))
                {
                    return(true);
                }
                break;

            case PlayModes.OsuMania:
                //TODO: Reimplement this?
                break;
            }

            return(false);
        }
예제 #14
0
 public bUserStatus(bStatus status, string beatmapHash, string beatmap, Mods mods, PlayModes playMode,
                    int beatmapId)
 {
     this.status      = status;
     this.beatmap     = beatmap;
     this.beatmapHash = beatmapHash;
     this.mods        = mods;
     this.playMode    = playMode;
     this.beatmapId   = beatmapId;
 }
예제 #15
0
 // Token: 0x060028DD RID: 10461
 // RVA: 0x00101C30 File Offset: 0x000FFE30
 internal Class661(int int_4, Class861 class861_1, MatchScoringTypes matchScoringTypes_1, PlayModes playModes_1, SlotTeams slotTeams_1, Mods mods_1)
     : base(int_4, class861_1.Name, playModes_1)
 {
     base.method_1(slotTeams_1);
     this.class861_0 = class861_1;
     this.matchScoringTypes_0 = matchScoringTypes_1;
     this.mods_0 = mods_1;
     for (int i = 0; i < this.list_0.Count; i++)
     {
         Class531 class = this.list_0[i];
예제 #16
0
 public bStatusUpdate(bStatus status, bool beatmapUpdate, string statusText, string songChecksum, int beatmapId, Mods mods,
                      PlayModes playMode)
 {
     this.status     = status;
     beatmapChecksum = songChecksum;
     this.statusText = statusText;
     currentMods     = mods;
     this.playMode   = playMode;
     this.beatmapId  = beatmapId;
 }
예제 #17
0
        private void OnQuickJoin(object sender, EventArgs e)
        {
            PlayModes         pm = (PlayModes)ConfigManager.sLobbyPlayMode.Value;
            List <LobbyMatch> availableMatches = null;

            lock (Matches)
            {
                availableMatches = Matches.FindAll(m =>
                {
                    bMatch bm = m.matchInfo;
                    if (bm.passwordRequired || bm.inProgress || bm.slotFreeCount == 0)
                    {
                        return(false);
                    }
                    if (ConfigManager.sLobbyPlayMode.Value != -1 && bm.playMode != pm)
                    {
                        return(false);
                    }
                    return(true);
                });
            }
            if (availableMatches.Count > 0)
            {
                var comparer = new QuickJoinMatchComparer();
                availableMatches.Sort(comparer);

                bMatch selectedMatch = null;
                foreach (var availableMatch in availableMatches)
                {
                    if (!quickJoinIgnoredIds.Contains(availableMatch.matchInfo.matchId))
                    {
                        selectedMatch = availableMatch.matchInfo;
                        break;
                    }
                }

                if (selectedMatch == null)
                {
                    selectedMatch = availableMatches[0].matchInfo;
                    quickJoinIgnoredIds.Clear();
                }
                else if (quickJoinIgnoredIds.Count > 8)
                {
                    quickJoinIgnoredIds.RemoveAt(0);
                }

                quickJoinIgnoredIds.Add(selectedMatch.matchId);
                Debug.Print($"Joining match {selectedMatch.matchId} with score {comparer.CalculateScore(selectedMatch)} ({selectedMatch.beatmapName})");
                JoinMatch(selectedMatch);
            }
            else
            {
                NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.Lobby_QuickJoin_Fail), Color.Red, 1500);
            }
        }
예제 #18
0
 public Event(ModifierKeys a_mod, Keys a_key, string a_sound, string a_image, int a_lineNum, Button btn, float a_vol, PlayModes a_playmode)
 {
     modifier  = a_mod;
     key       = a_key;
     lineNum   = a_lineNum;
     SoundName = a_sound;
     ImageName = a_image;
     button    = btn;
     Volume    = a_vol;
     PlayMode  = a_playmode;
 }
예제 #19
0
        internal static List <Score> FindScores(string checksum, PlayModes playMode)
        {
            if (LocalScores == null)
            {
                return(null);
            }

            List <Score> list;

            return(LocalScores.TryGetValue(checksum, out list) ? list.FindAll(s => s.PlayMode == playMode) : null);
        }
예제 #20
0
파일: IOL.cs 프로젝트: PanCrucian/IOL
 /// <summary>
 /// Загрузить игровой уровень
 /// </summary>
 public void GameLoad(PlayModes playMode)
 {
     switch (playMode)
     {
         case PlayModes.FiveVsFive:
             Application.LoadLevel("Game5vs5");
             break;
         case PlayModes.ThreeVsThree:
             Application.LoadLevel("Game3vs3");
             break;
     }
 }
예제 #21
0
        private void buttonOk_Click(object sender, EventArgs e)
        {
            if (!changesMade)
            {
                DialogResult = DialogResult.OK;
                Close();
                return;
            }

            HitObjectManager hitObjectManager = editor.hitObjectManager;

            bool allowSave = false;

            //Converting to or from Mania mode is not currently supported.
            PlayModes newMode = (PlayModes)allowedModes.SelectedIndex;

            if ((newMode == PlayModes.OsuMania || originMode == PlayModes.OsuMania) && originMode != newMode)
            {
                if (MessageBox.Show("You changed play mode, do you want to save changes and clear all notes?", "Song Setup", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    hitObjectManager.Clear();
                    editor.changeManager.Dirty = false;
                    allowSave = true;
                }
            }
            else
            {
                allowSave = !confirmSave || MessageBox.Show("Do you want to save changes to this beatmap?", "Song Setup", MessageBoxButtons.OKCancel) == DialogResult.OK;
            }

            if (!allowSave)
            {
                return;
            }

            Beatmap beatmap = hitObjectManager.Beatmap;

            applySettings(beatmap);

            Enabled = false;
            Invalidate();

            // Update all breaks to the new PreEmpt value so that they aren't mistaken for custom.
            hitObjectManager.UpdateVariables(false, true);
            editor.UpdateBreaks(true, false);

            bool result = hitObjectManager.Save(false, newDifficulty, false);

            editor.LoadFile(beatmap, false, false);

            DialogResult = result ? DialogResult.OK : DialogResult.Cancel;
            Close();
        }
예제 #22
0
        public bMatch(SerializationReader sr)
        {
            SendPassword = false;

            matchId         = sr.ReadUInt16();
            inProgress      = sr.ReadBoolean();
            matchType       = (MatchTypes)sr.ReadByte();
            activeMods      = (Mods)sr.ReadUInt32();
            gameName        = sr.ReadString();
            gamePassword    = sr.ReadString();
            beatmapName     = sr.ReadString();
            beatmapId       = sr.ReadInt32();
            beatmapChecksum = sr.ReadString();

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotStatus[i] = (SlotStatus)sr.ReadByte();
            }

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotTeam[i] = (SlotTeams)sr.ReadByte();
            }

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotId[i] = (slotStatus[i] & SlotStatus.HasPlayer) > 0 ? sr.ReadInt32() : -1;
            }

            hostId = sr.ReadInt32();

            playMode = (PlayModes)sr.ReadByte();

            matchScoringType = (MatchScoringTypes)sr.ReadByte();
            matchTeamType    = (MatchTeamTypes)sr.ReadByte();

            specialModes = (MultiSpecialModes)sr.ReadByte();

            if (gameName.Length > 50)
            {
                gameName = gameName.Remove(50);
            }

            if ((specialModes & MultiSpecialModes.FreeMod) > 0)
            {
                for (int i = 0; i < MAX_PLAYERS; i++)
                {
                    slotMods[i] = (Mods)sr.ReadInt32();
                }
            }
            Seed = sr.ReadInt32();
        }
예제 #23
0
 public void Generate(HintSelections hints)
 {
     // Take any solution for a clear grid
     ClearGrid();
     Candidate[] soln = solver.RandomSolution();
     if (soln == null)
     {
         return;
     }
     int[,] ans = new int[Cells, Cells];
     foreach (Candidate k in soln)
     {
         SudokuCandidate sc = (SudokuCandidate)k;
         ans[sc.x, sc.y] = sc.n;
     }
     // Add clues until soluable
     PlayMode = PlayModes.EditCell;
     while (true)
     {
         SolveResult sr = solver.DoLogicalSolve(this, hints);
         if (sr == SolveResult.SingleSolution)
         {
             break;
         }
         int x = Utils.Utils.Rnd(Cells);
         int y = Utils.Utils.Rnd(Cells);
         if (sr == SolveResult.NoSolutions)
         {
             ClearCell(x, y);
             ClearCell(8 - x, 8 - y);
         }
         else
         {
             SetCell(x, y, ans[x, y]);
             SetCell(Cells - x - 1, Cells - y - 1, ans[Cells - x - 1, Cells - y - 1]);
         }
     }
     // Remove any clues where it remains soluable
     for (int x = 0; x < Cells; ++x)
     {
         for (int y = 0; y < Cells; ++y)
         {
             ClearCell(x, y);
             if (solver.DoLogicalSolve(this, hints) != SolveResult.SingleSolution)
             {
                 SetCell(x, y, ans[x, y]);
             }
         }
     }
     Setup();
 }
예제 #24
0
        /// <summary>
        /// Updates current tallies on various mapset information
        /// </summary>
        /// <param name="map">The map to take new data from</param>
        private void updateDataCounts(Beatmap map)
        {
            PlayModes mode = map.PlayMode;

            countMode(mode);

            if (mode == PlayModes.Osu)
            {
                if (map.DifficultyEyupStars < minStarsOsu)
                {
                    minStarsOsu = map.DifficultyEyupStars;
                }
            }
        }
예제 #25
0
 public bUserPresence(int userId, string username, AvatarExtension avatar, int timezone, int countryCode, Permissions permission, float longitude, float latitude, int rank, bool isOsu, PlayModes playMode)
 {
     this.userId          = userId;
     this.username        = username;
     this.timezone        = timezone;
     this.countryCode     = (byte)countryCode;
     this.permission      = permission;
     this.avatarExtension = avatar;
     this.longitude       = longitude;
     this.latitude        = latitude;
     this.rank            = rank;
     this.isOsu           = isOsu;
     this.playMode        = playMode;
 }
예제 #26
0
 // Token: 0x060020A2 RID: 8354
 // RVA: 0x000BD190 File Offset: 0x000BB390
 public static Mods smethod_1(Mods mods_1, PlayModes playModes_0, Class296 class296_1)
 {
     switch (playModes_0)
     {
     case PlayModes.Taiko:
         return mods_1 & Class465.smethod_2();
     case PlayModes.CatchTheBeat:
         return mods_1 & Class462.smethod_2();
     case PlayModes.OsuMania:
         return Class421.smethod_5(class296_1, mods_1) & Class463.smethod_2();
     default:
         return mods_1 & Class464.smethod_2();
     }
 }
예제 #27
0
 // Token: 0x06000E13 RID: 3603
 // RVA: 0x0004DAD0 File Offset: 0x0004BCD0
 public Class12(Class32 class32_0)
 {
     this.bStatus_0 = (bStatus)class32_0.ReadByte();
     this.string_1 = class32_0.ReadString();
     this.string_0 = class32_0.ReadString();
     if (Class213.int_0 > 10)
     {
         this.mods_0 = (Mods)class32_0.ReadUInt32();
     }
     else
     {
         this.mods_0 = (Mods)class32_0.ReadInt16();
     }
     this.playModes_0 = (PlayModes)Math.Max(0, Math.Min(3, class32_0.ReadByte()));
     this.int_0 = class32_0.ReadInt32();
 }
예제 #28
0
 public bUserStatus(SerializationReader reader)
 {
     status      = (bStatus)reader.ReadByte();
     beatmapHash = reader.ReadString();
     beatmap     = reader.ReadString();
     if (Bancho.Protocol > 10)
     {
         mods = (Mods)reader.ReadUInt32();
     }
     else
     {
         mods = (Mods)reader.ReadInt16();
     }
     playMode  = (PlayModes)Math.Max((byte)0, Math.Min((byte)3, reader.ReadByte()));
     beatmapId = reader.ReadInt32();
 }
예제 #29
0
		// Token: 0x060015C7 RID: 5575
		// RVA: 0x0006FAD0 File Offset: 0x0006DCD0
		public static string smethod_0(PlayModes playModes_0)
		{
			switch (playModes_0)
			{
			case PlayModes.Osu:
				IL_18:
				return "osu!";
			case PlayModes.Taiko:
				return "Taiko";
			case PlayModes.CatchTheBeat:
				return "Catch the Beat";
			case PlayModes.OsuMania:
				return "osu!mania";
			}
			goto IL_18;
		}
예제 #30
0
 public bStatusUpdate(SerializationReader sr)
 {
     status          = (bStatus)sr.ReadByte();
     statusText      = sr.ReadString();
     beatmapChecksum = sr.ReadString();
     if (OsuCommon.ProtocolVersion > 10)
     {
         currentMods = (Mods)sr.ReadUInt32();
     }
     else
     {
         currentMods = (Mods)sr.ReadInt16();
     }
     playMode  = (PlayModes)Math.Max((byte)0, Math.Min((byte)3, sr.ReadByte()));
     beatmapId = sr.ReadInt32();
 }
        static public Mods MaskRelevantMods(Mods mods, PlayModes mode, Beatmap map)
        {
            switch (mode)
            {
            case PlayModes.Taiko:
                return(mods & BeatmapDifficultyCalculatorTaiko.RelevantMods);

            case PlayModes.CatchTheBeat:
                return(mods & BeatmapDifficultyCalculatorFruits.RelevantMods);

            case PlayModes.OsuMania:
                return(StageMania.CanonicalKeyMods(map, mods) & BeatmapDifficultyCalculatorMania.RelevantMods);

            default:
                return(mods & BeatmapDifficultyCalculatorOsu.RelevantMods);
            }
        }
예제 #32
0
        public static Score CreateFromOnline(PlayModes playMode, string input, Beatmap beatmap)
        {
            switch (playMode)
            {
            case PlayModes.CatchTheBeat:
                return(new ScoreFruits(input, beatmap));

            case PlayModes.Taiko:
                return(new ScoreTaiko(input, beatmap));

            case PlayModes.OsuMania:
                return(new ScoreMania(input, beatmap));

            default:
                return(new Score(input, beatmap));
            }
        }
예제 #33
0
        internal ScoreboardEntry(int rank, string name, PlayModes playMode)
        {
            this.rank     = rank;
            this.playMode = playMode;
            this.name     = name ?? @"-";
            creationOrder = creationCount++;

            float depth = 0.92f;

            SpriteBackground = new pSprite(TextureManager.Load(@"menu-button-background"), Fields.TopLeft, Origins.Custom, Clocks.Game, Vector2.Zero, depth, true, new Color(0, 0, 0, 150))
            {
                Alpha = 0,
                Scale = 0.62f
            };

            SpriteName = new pText(name, 14, new Vector2(0, -2), Vector2.Zero, depth + 0.000003f, true, new Color(255, 255, 255, 0), true);

            SpriteScore = new pSpriteText(string.Empty, @"scoreentry", 2.5f, Fields.TopLeft, Origins.TopLeft, Clocks.Game, new Vector2(2, 18), depth + 0.000003f, true, new Color(255, 255, 255, 0))
            {
                TextConstantSpacing = true
            };

            SpriteCombo = new pSpriteText(string.Empty, @"scoreentry", 2.5f, Fields.TopLeft, Origins.TopRight, Clocks.Game, new Vector2(82, 18), depth + 0.000003f, true, new Color(153, 251, 255, 0))
            {
                TextConstantSpacing = true
            };

            SpriteRank = new pSpriteText(rank > 0 ? rank.ToString() : string.Empty, @"scoreentry", 3, Fields.TopLeft, Origins.TopRight, Clocks.Game, new Vector2(82, -2), depth + 0.000002f, true,
                                         new Color(255, 255, 255, 80))
            {
                Scale = 2.2f,
                Alpha = 0
            };

            SpriteCollection = new List <pSprite>
            {
                SpriteBackground,
                SpriteName,
                SpriteScore,
                SpriteCombo,
                SpriteRank
            };

            UpdateSpriteLayout();
        }
예제 #34
0
        public static string PlayModeString(PlayModes mode)
        {
            switch (mode)
            {
            default:
            case PlayModes.Osu:
                return("osu!");

            case PlayModes.Taiko:
                return("Taiko");

            case PlayModes.CatchTheBeat:
                return("Catch the Beat");

            case PlayModes.OsuMania:
                return("osu!mania");
            }
        }
예제 #35
0
 public bMatchData(SerializationReader reader)
 {
     SendPassword    = false;
     matchId         = reader.ReadUInt16();
     inProgress      = reader.ReadBoolean();
     matchType       = (MatchTypes)reader.ReadByte();
     activeMods      = (Mods)reader.ReadUInt32();
     gameName        = reader.ReadString();
     gamePassword    = reader.ReadString();
     beatmapName     = reader.ReadString();
     beatmapId       = reader.ReadInt32();
     beatmapChecksum = reader.ReadString();
     for (var i = 0; i < MaxRoomPlayers; i++)
     {
         slotStatus[i] = (SlotStatus)reader.ReadByte();
     }
     for (var j = 0; j < MaxRoomPlayers; j++)
     {
         slotTeam[j] = (SlotTeams)reader.ReadByte();
     }
     for (var k = 0; k < MaxRoomPlayers; k++)
     {
         slotId[k] = (((slotStatus[k] & SlotStatus.Occupied) > (SlotStatus)0)
             ? reader.ReadInt32()
             : -1);
     }
     hostId           = reader.ReadInt32();
     playMode         = (PlayModes)reader.ReadByte();
     matchScoringType = (MatchScoringTypes)reader.ReadByte();
     matchTeamType    = (MatchTeamTypes)reader.ReadByte();
     specialModes     = (MultiSpecialModes)reader.ReadByte();
     if (gameName.Length > 50)
     {
         gameName = gameName.Remove(50);
     }
     if ((specialModes & MultiSpecialModes.FreeMod) > MultiSpecialModes.None)
     {
         for (var l = 0; l < MaxRoomPlayers; l++)
         {
             slotMods[l] = (Mods)reader.ReadInt32();
         }
     }
     Seed = reader.ReadInt32();
 }
예제 #36
0
파일: Form1.cs 프로젝트: dzzizle/east-end
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (cmboxPlayMode.SelectedIndex)
            {
            case 0:
                playMode = PlayModes.Osu;
                break;

            case 1:
                playMode = PlayModes.CatchTheBeat;
                break;

            case 2:
                playMode = PlayModes.Taiko;
                break;

            case 3:
                playMode = PlayModes.OsuMania
                           break;
            }
        }
예제 #37
0
 // Token: 0x06000E2F RID: 3631
 // RVA: 0x0004E0E0 File Offset: 0x0004C2E0
 public Class17(Class32 class32_0)
 {
     this.int_1 = class32_0.ReadInt32();
     if (this.int_1 < 0)
     {
         this.int_1 = -this.int_1;
     }
     else
     {
         this.bool_0 = (this.int_1 != 0);
     }
     this.string_0 = class32_0.ReadString();
     this.int_0 = (int)(class32_0.ReadByte() - 24);
     this.byte_0 = class32_0.ReadByte();
     byte b = class32_0.ReadByte();
     this.enum30_0 = ((Enum30)b & (Enum30)(-225));
     this.playModes_0 = (PlayModes)Math.Max(0, Math.Min(3, (b & 224) >> 5));
     this.float_0 = class32_0.ReadSingle();
     this.float_1 = class32_0.ReadSingle();
     this.int_2 = class32_0.ReadInt32();
 }
예제 #38
0
 public bUserInfo(int ID, string Name, int TimeZone, byte CountryID, UserTags Tags, PlayModes PlayMode,
                  float Longitude, float Latitude, int GlobalRank)
 {
     this.ID = ID;
     if (this.ID < 0)
     {
         this.ID = -this.ID;
     }
     else
     {
         IsValidId = (this.ID != 0);
     }
     this.Name       = Name;
     this.TimeZone   = TimeZone;
     this.CountryID  = CountryID;
     this.Tags       = Tags;
     this.PlayMode   = PlayMode;
     this.Longitude  = Longitude;
     this.Latitude   = Latitude;
     this.GlobalRank = GlobalRank; //NOTE: It can not be this
 }
예제 #39
0
        /// <summary>
        /// Increases mode specific counter
        /// </summary>
        /// <param name="mode"></param>
        private void countMode(PlayModes mode)
        {
            switch (mode)
            {
            case PlayModes.Taiko:
                taikoCount++;
                break;

            case PlayModes.CatchTheBeat:
                ctbCount++;
                break;

            case PlayModes.OsuMania:
                maniaCount++;
                break;

            default:
                osuCount++;
                break;
            }
        }
예제 #40
0
 // Token: 0x06002F16 RID: 12054
 // RVA: 0x00131C14 File Offset: 0x0012FE14
 internal static bool smethod_12(Keys keys_3, PlayModes playModes_0)
 {
     switch (playModes_0)
     {
     case PlayModes.Osu:
         if (keys_3 == Class795.smethod_3(Bindings.OsuLeft))
         {
             return true;
         }
         if (keys_3 == Class795.smethod_3(Bindings.OsuRight))
         {
             return true;
         }
         break;
     case PlayModes.Taiko:
         if (keys_3 == Class795.smethod_3(Bindings.TaikoInnerLeft))
         {
             return true;
         }
         if (keys_3 == Class795.smethod_3(Bindings.TaikoInnerRight))
         {
             return true;
         }
         if (keys_3 == Class795.smethod_3(Bindings.TaikoOuterLeft))
         {
             return true;
         }
         if (keys_3 == Class795.smethod_3(Bindings.TaikoOuterRight))
         {
             return true;
         }
         break;
     case PlayModes.CatchTheBeat:
         if (keys_3 == Class795.smethod_3(Bindings.FruitsLeft))
         {
             return true;
         }
         if (keys_3 == Class795.smethod_3(Bindings.FruitsRight))
         {
             return true;
         }
         if (keys_3 == Class795.smethod_3(Bindings.FruitsDash))
         {
             return true;
         }
         break;
     }
     return false;
 }
예제 #41
0
파일: Main.cs 프로젝트: ta0soft/STEAMp3
        public void Dispose()
        {
            Global.Settings.PlayMode = (int)p_PlayMode;

            //if (p_WebClient != null) p_WebClient.Dispose();
            p_StreamTitle = string.Empty;
            if (p_Shoutcast != null) p_Shoutcast.Dispose();
            p_DefaultDevice = null;
            p_CurrentDevice = null;
            p_Devices.Clear();
            p_Timer2.Dispose();
            p_Timer.Dispose();
            p_PlayMode = PlayModes.None;
            DisposeMediaPlayer();
            DisposeID3();
        }
예제 #42
0
 // Token: 0x0600266B RID: 9835
 // RVA: 0x000E74D4 File Offset: 0x000E56D4
 public override void Initialize()
 {
     Class858.smethod_4(false);
     Class296 current = Class466.Current;
     Class466.smethod_2(current);
     Class872.int_2 = 30;
     this.list_0 = new List<Editor.Class626>();
     this.stack_0 = new Stack<Editor.Class626>();
     this.stack_1 = new Stack<Editor.Class626>();
     this.class911_3 = new Class911(true);
     this.class297_0 = new Class301(true);
     Class876.Reset();
     Class876.class623_0 &= ~Mods.DoubleTime;
     Class62.class512_0 = null;
     Class115.editorControl_0.method_7(this);
     this.method_60();
     try
     {
         if (current.Title.Length == 0)
         {
             Class331.smethod_91();
             string text = Class34.smethod_19(current.string_1);
             if (text != current.string_1)
             {
                 if (text.Length < 4)
                 {
                     text = "music.mp3";
                 }
                 if (Class34.smethod_14(current.string_1, text, true, true))
                 {
                     current.string_1 = text;
                 }
             }
             Class331.smethod_84(current, true, false, true, false);
             current.Title = Class34.smethod_19(Class331.string_1);
             current.TitleUnicode = Class331.string_1;
             current.Artist = Class34.smethod_19(Class331.string_0);
             current.ArtistUnicode = Class331.string_0;
         }
         else
         {
             Class331.smethod_84(current, false, false, true, false);
         }
     }
     catch (Exception11)
     {
         Class723.smethod_1("Could not load audio file.", 2000);
         this.method_82(false);
         return;
     }
     if (this.method_3(current, false, false))
     {
         this.method_67(Class778.smethod_2(current.float_2, 0.1f, 8f));
         this.method_43();
         switch (current.method_5())
         {
         case PlayModes.Taiko:
             this.class371_0 = new Class373(this);
             break;
         case PlayModes.CatchTheBeat:
             this.class371_0 = new Class372(this);
             break;
         case PlayModes.OsuMania:
             this.class371_0 = new Class374(this);
             break;
         default:
             this.class371_0 = new Class371(this);
             break;
         }
         if (Class63.list_4 != null && Class63.list_4 != this.class297_0.list_1)
         {
             this.class297_0.list_1 = Class63.list_4;
             Editor.editor_0.bool_5 = true;
         }
         Class63.list_4 = null;
         this.playModes_0 = current.method_5();
         this.class375_0 = new Class375(this);
         this.class376_0 = new Class376(this);
         Class802.smethod_34(Enum96.const_8, new Delegate46(this.method_84), Enum98.const_2, Enum97.const_0);
         Class802.smethod_34(Enum96.const_6, new Delegate46(this.method_28), Enum98.const_2, Enum97.const_0);
         Class802.smethod_34(Enum96.const_5, new Delegate46(this.method_83), Enum98.const_2, Enum97.const_0);
         Class802.smethod_34(Enum96.const_3, new Delegate46(this.method_86), Enum98.const_2, Enum97.const_0);
         Class570.smethod_4(new Class570.Delegate45(this.method_78));
         Class802.smethod_34(Enum96.const_2, new Delegate46(this.method_87), Enum98.const_2, Enum97.const_0);
         Class802.smethod_34(Enum96.const_1, new Delegate46(this.method_74), Enum98.const_2, Enum97.const_0);
         Class802.smethod_34(Enum96.const_0, new Delegate46(this.method_75), Enum98.const_2, Enum97.const_0);
         Class802.smethod_34(Enum96.const_1, new Delegate46(this.method_72), Enum98.const_7, Enum97.const_0);
         Class802.smethod_34(Enum96.const_0, new Delegate46(this.method_73), Enum98.const_7, Enum97.const_0);
         Class115.smethod_15(new VoidDelegate(this.method_26));
         Class331.smethod_27(new Class331.Delegate31(this.method_27));
         this.class371_0.Initialize();
         this.class375_0.Initialize();
         this.class376_0.Initialize();
         Class115.editorControl_0.method_3(100);
         Class115.editorControl_0.method_6(Class371.dictionary_0[Enum106.flag_3]);
         this.method_42(Class341.class608_3, false);
         base.Initialize();
         Class331.smethod_89(100, false);
         if (Class331.smethod_14().Count == 0)
         {
             this.method_57(Enum105.const_3);
         }
         else
         {
             this.method_57((Editor.enum105_1 != Enum105.const_0) ? Editor.enum105_1 : Enum105.const_1);
         }
         Class115.editorControl_0.method_2(this.enum105_0);
         if (!Class115.bool_25 && Class115.int_28 <= 0)
         {
             if (current.int_7 > 0)
             {
                 Class331.smethod_70(current.int_7, false, false);
             }
             else
             {
                 Class331.smethod_70(0, false, false);
             }
         }
         else
         {
             Class331.smethod_70(Class115.int_28, false, false);
             Class115.int_28 = 0;
             Class115.bool_25 = false;
         }
         this.method_38(Class331.smethod_67());
         Class115.editorControl_0.method_11(Class331.smethod_18());
         Class723.smethod_2(null, null);
         Class115.class83_0.bool_2 = false;
         return;
     }
 }
예제 #43
0
 // Token: 0x06000DFE RID: 3582
 // RVA: 0x0004D28C File Offset: 0x0004B48C
 public bMatch(MatchTypes matchTypes_0, MatchScoringTypes matchScoringTypes_0, MatchTeamTypes matchTeamTypes_0, PlayModes playModes_0, string string_0, string string_1, int int_0, string string_2, string string_3, int int_1, Mods mods_0, int int_2, MultiSpecialModes multiSpecialModes_0, int int_3)
 {
     this.matchType = matchTypes_0;
     this.playMode = playModes_0;
     this.matchScoringType = matchScoringTypes_0;
     this.matchTeamType = matchTeamTypes_0;
     this.gameName = string_0;
     this.gamePassword = string_1;
     this.beatmapName = string_2;
     this.beatmapChecksum = string_3;
     this.beatmapId = int_1;
     this.activeMods = mods_0;
     this.hostId = int_2;
     this.specialModes = multiSpecialModes_0;
     this.Seed = int_3;
     this.SendPassword = true;
     for (int i = 0; i < bMatch.smethod_0(); i++)
     {
         this.slotStatus[i] = ((i < int_0) ? SlotStatus.flag_0 : SlotStatus.flag_1);
         this.slotId[i] = -1;
     }
     if (string_0.Length > 50)
     {
         string_0 = string_0.Remove(50);
     }
 }
예제 #44
0
 // Token: 0x06000DFF RID: 3583
 // RVA: 0x0004D394 File Offset: 0x0004B594
 public bMatch(Class32 class32_0)
 {
     this.SendPassword = false;
     this.matchId = (int)class32_0.ReadUInt16();
     this.inProgress = class32_0.ReadBoolean();
     this.matchType = (MatchTypes)class32_0.ReadByte();
     this.activeMods = (Mods)class32_0.ReadUInt32();
     this.gameName = class32_0.ReadString();
     this.gamePassword = class32_0.ReadString();
     this.beatmapName = class32_0.ReadString();
     this.beatmapId = class32_0.ReadInt32();
     this.beatmapChecksum = class32_0.ReadString();
     for (int i = 0; i < bMatch.smethod_0(); i++)
     {
         this.slotStatus[i] = (SlotStatus)class32_0.ReadByte();
     }
     for (int j = 0; j < bMatch.smethod_0(); j++)
     {
         this.slotTeam[j] = (SlotTeams)class32_0.ReadByte();
     }
     for (int k = 0; k < bMatch.smethod_0(); k++)
     {
         this.slotId[k] = (((this.slotStatus[k] & SlotStatus.flag_7) > (SlotStatus)0) ? class32_0.ReadInt32() : -1);
     }
     this.hostId = class32_0.ReadInt32();
     this.playMode = (PlayModes)class32_0.ReadByte();
     this.matchScoringType = (MatchScoringTypes)class32_0.ReadByte();
     this.matchTeamType = (MatchTeamTypes)class32_0.ReadByte();
     this.specialModes = (MultiSpecialModes)class32_0.ReadByte();
     if (this.gameName.Length > 50)
     {
         this.gameName = this.gameName.Remove(50);
     }
     if ((this.specialModes & MultiSpecialModes.FreeMod) > MultiSpecialModes.None)
     {
         for (int l = 0; l < bMatch.smethod_0(); l++)
         {
             this.slotMods[l] = (Mods)class32_0.ReadInt32();
         }
     }
     this.Seed = class32_0.ReadInt32();
 }
예제 #45
0
		// Token: 0x060028DE RID: 10462
		// RVA: 0x0001F6FB File Offset: 0x0001D8FB
		internal Class662(int int_4, Class861 class861_1, MatchScoringTypes matchScoringTypes_1, PlayModes playModes_1, SlotTeams slotTeams_1) : base(int_4, class861_1, matchScoringTypes_1, playModes_1, slotTeams_1, Mods.None)
		{
			this.class533_2.Text = string.Empty;
		}
예제 #46
0
 // Token: 0x06002AD8 RID: 10968
 // RVA: 0x00115760 File Offset: 0x00113960
 internal Class695(Class296 class296_1, Class695 class695_2, PlayModes? nullable_1)
 {
     this.class695_1 = class695_2;
     if (nullable_1.HasValue)
     {
         this.nullable_0 = nullable_1;
     }
     this.method_5(Class695.color_3);
     this.class296_0 = class296_1;
     if (class296_1 != null)
     {
         if (!class296_1.bool_4)
         {
             this.method_5(Class695.color_8);
         }
         this.bool_0 = !class296_1.bool_13;
     }
     this.color_12 = this.method_4();
 }