Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.uiColor = new Color4(0.5f, 0.5f, 1f, 1f);
- this.uiRaces = new UIMenu();
- for (int index = 0; index < 3; ++index)
- {
- RaceParameters p = this.GenerateRace();
- this.uiRaces.AddItem(p.Name, (Action) (() => this.game.StartRace(p)), this.uiColor);
- }
- this.uiUpgrades = new UIMenu[7];
- for (int index1 = 0; index1 < this.uiUpgrades.Length; ++index1)
- {
- this.uiUpgrades[index1] = new UIMenu();
- for (int index2 = 0; index2 < this.playerCar.CarInfo.Parts.Count; ++index2)
- {
- if (this.playerCar.CarInfo.Parts[index2].Class == index1)
- {
- string text = string.Format("{0} - {1}руб.", (object) this.playerCar.CarInfo.Parts[index2].Name, (object) this.playerCar.CarInfo.Parts[index2].Price);
- int partId = index2;
- this.uiUpgrades[index1].AddItem(text, (Action) (() => this.OnPurchasePart(partId)), this.uiColor);
- }
- }
- this.uiUpgrades[index1].AddItem("Вернуться", (Action) (() => this.currMenu = this.uiUpgrade), this.uiColor);
- }
- this.uiPaintBooth = new UIMenu();
- this.uiUpgrade = new UIMenu();
- this.uiUpgrade.AddItem("Блок цилиндров", (Action) (() => this.currMenu = this.uiUpgrades[0]), this.uiColor);
- this.uiUpgrade.AddItem("Топливная система", (Action) (() => this.currMenu = this.uiUpgrades[1]), this.uiColor);
- this.uiUpgrade.AddItem("Валы", (Action) (() => this.currMenu = this.uiUpgrades[2]), this.uiColor);
- this.uiUpgrade.AddItem("Зажигание", (Action) (() => this.currMenu = this.uiUpgrades[3]), this.uiColor);
- this.uiUpgrade.AddItem("Турбонаддув", (Action) (() => this.currMenu = this.uiUpgrades[4]), this.uiColor);
- this.uiUpgrade.AddItem("Трансмиссия", (Action) (() => this.currMenu = this.uiUpgrades[5]), this.uiColor);
- this.uiUpgrade.AddItem("Шины", (Action) (() => this.currMenu = this.uiUpgrades[6]), this.uiColor);
- this.uiUpgrade.AddItem("Высота пружин", (Action) (() => { }), this.uiColor);
- this.uiUpgrade.AddItem("Покраска", (Action) (() => this.currentState = GarageState.PaintBooth), this.uiColor);
- this.uiUpgrade.AddItem("Вернуться", (Action) (() => this.currMenu = this.uiMain), this.uiColor);
- this.InitCarDealer();
- this.uiMain = new UIMenu();
- this.uiMain.AddItem("События", (Action) (() => this.currMenu = this.uiRaces), this.uiColor);
- this.uiMain.AddItem("Тюнинг", (Action) (() => this.currMenu = this.uiUpgrade), this.uiColor);
- this.uiMain.AddItem("Автосалон", (Action) (() =>
- {
- this.currMenu = this.uiCarDealer;
- this.playerCar.Destroy();
- this.playerCar = (Car) null;
- }), this.uiColor);
- this.uiMain.AddItem("Статистика", (Action) (() => { }), this.uiColor);
- this.uiMain.AddItem("Главное меню", (Action) (() => { }), this.uiColor);
- this.currMenu = this.uiMain;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement