public PlayerInfo(float x, float y, Image parent, PlayerGui parentGui) : base(x, y) { this.background = new Image("Assets/Img/artifact_menu.png"); AddGraphic(background); this.parent = parent; this.parentGui = parentGui; Visible = true; MainScene.Instance.Add(this); //CreateText(ref gearName, gearPiece.name, 40, new Vector2(0, 0)); CreateText(ref InfoText, "", 20, new Vector2(50, 25)); //gearName.SetPosition(250, 0); //gearName.CenterTextOriginX(); InfoText.CenterTextOriginX(); Layer = -999; }
public GearGui(float x, float y, Gear gearPiece, Image parent, PlayerGui parentGui) : base(x, y) { this.background = new Image("Assets/Img/artifact_menu.png"); AddGraphic(background); this.gearPiece = gearPiece; this.parent = parent; this.parentGui = parentGui; Visible = true; MainScene.Instance.Add(this); CreateText(ref gearName, gearPiece.name, 40, new Vector2(0, 0)); CreateText(ref gearInfo, "", 20, new Vector2(50, 100)); gearName.SetPosition(250, 0); gearName.CenterTextOriginX(); gearInfo.CenterTextOriginX(); }
public override void Begin() { activeSkillList = new List <ActiveSkill>(); enemyList = new List <Enemy_Units>(); base.Begin(); crosshair = new Crosshair(); player = new MyPlayer(941, 575); Add(player); AddGraphic(background); foreach (BonusType bonusType in Enum.GetValues(typeof(BonusType))) { Bonuses.Add(bonusType, 0); } CreateGear(); CreateSkills(); CreateUnits(); //gearList[8].level = 10; //gearList[8].unlocked = true; UpdateBonuses(); //currentStage = 1000; HUD(); Vector2 Pos = new Vector2(47, 854); int counter = 1; foreach (var Unit in unitsList) { new GuiElement(Pos.X, Pos.Y, Unit); Pos.X += 82; if (counter == 11 || counter == 22) { Pos.Y += 70; Pos.X = 47; } counter++; } activeSkillList.Add(new Barrage()); activeSkillList.Add(new Clone()); activeSkillList.Add(new CriticalStrike()); activeSkillList.Add(new Speach()); activeSkillList.Add(new Overdrive()); activeSkillList.Add(new MoneyShot()); player.UpgradePlayer(); menu = new PlayerGui(955, 1080 - 261, "Assets/Img/bottom_menu.png", player) { Layer = 1000 }; //player.gold = 1E150; //Console.WriteLine(Convert.ToSingle(1E100)); /*new Soldier(1280, 510); * new Sniper(1112, 610); * new Mortar(1730, 722); * new Turret(930, 500); * new Dicokka(1550, 500); * new FatTonk(1500, 550); * new Minigun(1320, 700); * new BigTonk(1460, 480); * new BiggestTonk(1770, 660); * new Heli(1080, 280); * new Hover(1450, 320); * new Rocket(1700, 550);*/ this.soundVolume = Sound.GlobalVolume; Sound.GlobalVolume = 0; Music.Play(); new Garbage(754, 462, "Assets/Img/Decals/des09.png", false); new Garbage(831, 533, "Assets/Img/Decals/des16.png", true); new Garbage(832, 689, "Assets/Img/Decals/des17.png", true); new Garbage(925, 670, "Assets/Img/Decals/des10.png", false) { Layer = -100 }; new Garbage(936, 531, "Assets/Img/Decals/des01.png", false); new Garbage(1004, 575, "Assets/Img/Decals/des19.png", false); new Garbage(1322, 497, "Assets/Img/Decals/des19.png", false); new Garbage(1082, 612, "Assets/Img/Decals/des14.png", false); new Garbage(1115, 704, "Assets/Img/Decals/des18.png", false); new Garbage(1206, 665, "Assets/Img/Decals/des08.png", false); new Garbage(1161, 537, "Assets/Img/Decals/des08.png", false); new Garbage(1214, 484, "Assets/Img/Decals/des15.png", false); new Garbage(1032, 378, "Assets/Img/Decals/des13.png", true); new Garbage(1276, 555, "Assets/Img/Decals/des11.png", false); new Garbage(1248, 597, "Assets/Img/Decals/des24.png", false); new Garbage(1377, 595, "Assets/Img/Decals/des25.png", false); new Garbage(1372, 659, "Assets/Img/Decals/des20.png", false); new Garbage(1476, 648, "Assets/Img/Decals/des12.png", false); new Garbage(1381, 709, "Assets/Img/Decals/des22.png", false); if (session.Data.FileExists()) { LoadGame(); } else { Console.WriteLine("Ni ma pliku"); } StartStage(); }