示例#1
0
        internal PlayerVs(ClientSideMatch matchInfo)
        {
            Match    = matchInfo;
            Mode     = Match.playMode;
            TeamMode = matchInfo.TeamMode;

            switch (Match.matchTeamType)
            {
            case MatchTeamTypes.HeadToHead:
                MultiRuleset = new MultiRulesetVs(this);
                break;

            case MatchTeamTypes.TeamVs:
                MultiRuleset = new MultiRulesetTeamVs(this);
                break;

            case MatchTeamTypes.TagCoop:
            case MatchTeamTypes.TagTeamVs:
                MultiRuleset = new MultiRulesetTagCoop(this);
                break;
            }

            Instance = this;

            NotificationManager.ClearMessageMassive();
        }
示例#2
0
        protected override void Dispose(bool disposing)
        {
            Instance = null;
            if (TeamOverlay != null)
            {
                TeamOverlay.Hide();
            }
            InitializeScoreGraphs();
            LastScoreEntries = new List <ScoreboardEntryExtended>(ScoreEntries);

            ScoreEntries = null;

            MultiRuleset.Dispose();

            if (GameBase.Mode != OsuModes.RankingTagCoop && GameBase.Mode != OsuModes.RankingTeam && GameBase.Mode != OsuModes.RankingVs)
            {
                //Have exited from the game without reaching the ranking screen.
                //Dispose of static items we would be transferring to the ranking screen usually.
                DisposeStatic();
            }

            base.Dispose(disposing);
        }