예제 #1
0
        public override void Initialize()
        {
            this._background     = new Sprite("gym");
            this._boardHighlight = new Sprite("boardHighlight");
            this._boardHighlight.CenterOrigin();
            this._trophiesHighlight = new Sprite("trophiesHighlight");
            this._trophiesHighlight.CenterOrigin();
            HUD.AddCornerControl(HUDCorner.BottomLeft, "MOVE@DPAD@");
            HUD.AddCornerMessage(HUDCorner.TopLeft, this._profile.name);
            HUD.AddCornerControl(HUDCorner.TopRight, "@QUACK@EXIT");
            HUD.AddCornerControl(HUDCorner.BottomRight, "@GRAB@RESET");
            this.backgroundColor = Color.Black;
            this._confirmGroup   = new UIComponent(Layer.HUD.camera.width / 2f, Layer.HUD.camera.height / 2f, 0.0f, 0.0f);
            this._confirmMenu    = new UIMenu("CLEAR STATS?", Layer.HUD.camera.width / 2f, Layer.HUD.camera.height / 2f, 160f, conString: "@SELECT@SELECT");
            this._confirmMenu.Add((UIComponent) new UIMenuItem("NO!", (UIMenuAction) new UIMenuActionCloseMenu(this._confirmGroup)), true);
            this._confirmMenu.Add((UIComponent) new UIMenuItem("YES!", (UIMenuAction) new UIMenuActionCloseMenuSetBoolean(this._confirmGroup, this._clearStats)), true);
            this._confirmMenu.Close();
            this._confirmGroup.Add((UIComponent)this._confirmMenu, false);
            this._confirmGroup.Close();
            Level.Add((Thing)this._confirmGroup);
            Profile profile = this._profile;

            this._stats.Add(new LockerStat("KILLS: " + Change.ToString((object)profile.stats.kills), Color.GreenYellow));
            this._stats.Add(new LockerStat("DEATHS: " + Change.ToString((object)profile.stats.timesKilled), Color.Red));
            this._stats.Add(new LockerStat("SUICIDES: " + Change.ToString((object)profile.stats.suicides), Color.Red));
            this._stats.Add(new LockerStat("", Color.Red));
            this._stats.Add(new LockerStat("ROUNDS WON: " + Change.ToString((object)profile.stats.matchesWon), Color.GreenYellow));
            this._stats.Add(new LockerStat("ROUNDS LOST: " + Change.ToString((object)(profile.stats.timesSpawned - profile.stats.matchesWon)), Color.Red));
            this._stats.Add(new LockerStat("GAMES WON: " + Change.ToString((object)profile.stats.trophiesWon), Color.GreenYellow));
            this._stats.Add(new LockerStat("GAMES LOST: " + Change.ToString((object)(profile.stats.gamesPlayed - profile.stats.trophiesWon)), Color.Red));
            this._stats.Add(new LockerStat("", Color.Red));
            this._stats.Add(new LockerStat("FANS: " + Change.ToString((object)profile.stats.GetFans()), Color.Lime));
            int fans = profile.stats.GetFans();
            int num1 = 0;

            if (fans > 0)
            {
                num1 = (int)Math.Round((double)profile.stats.loyalFans / (double)profile.stats.GetFans() * 100.0);
            }
            this._stats.Add(new LockerStat("FAN LOYALTY: " + Change.ToString((object)num1) + "%", Color.Lime));
            this._stats.Add(new LockerStat("", Color.Red));
            float num2 = 0.0f;

            if (profile.stats.bulletsFired > 0)
            {
                num2 = (float)profile.stats.bulletsThatHit / (float)profile.stats.bulletsFired;
            }
            this._stats.Add(new LockerStat("ACCURACY: " + Change.ToString((object)(int)Math.Round((double)num2 * 100.0)) + "%", (double)num2 > 0.600000023841858 ? Color.Green : Color.Red));
            this._stats.Add(new LockerStat("", Color.Red));
            this._stats.Add(new LockerStat("TIMES QUACKED: " + Change.ToString((object)profile.stats.quacks), Color.Orange));
            this._stats.Add(new LockerStat("MINES STEPPED ON: " + Change.ToString((object)profile.stats.minesSteppedOn), Color.Orange));
            this._stats.Add(new LockerStat("PRESENTS OPENED: " + Change.ToString((object)profile.stats.presentsOpened), Color.Orange));
            this._stats.Add(new LockerStat("", Color.Red));
            this._stats.Add(new LockerStat("SPIRITUALITY", Color.White));
            this._stats.Add(new LockerStat("FUNERALS: " + Change.ToString((object)profile.stats.funeralsPerformed), Color.Orange));
            this._stats.Add(new LockerStat("CONVERSIONS: " + Change.ToString((object)profile.stats.conversions), Color.Orange));
            this._stats.Add(new LockerStat("", Color.Red));
            this._stats.Add(new LockerStat("TIME SPENT", Color.White));
            this._stats.Add(new LockerStat("IN NET: " + Change.ToString((object)(int)profile.stats.timeInNet) + " SECONDS", Color.Orange));
            this._stats.Add(new LockerStat("ON FIRE: " + Change.ToString((object)(int)profile.stats.timeOnFire) + " SECONDS", Color.Orange));
            this._stats.Add(new LockerStat("BRAINWASHED: " + Change.ToString((object)(int)profile.stats.timeUnderMindControl) + " SECONDS", Color.Orange));
            this._stats.Add(new LockerStat("MOUTH OPEN: " + Change.ToString((object)(int)profile.stats.timeWithMouthOpen) + " SECONDS", Color.Orange));
            base.Initialize();
        }