Exemplo n.º 1
0
        public GameStateShop(Game1 g, ContentManager c, Inventory inv)
        {
            Game = g;
            Content = c;
            inventory = inv;
            inputHandler = new InputHandler();
            background = new Sprite("shop-bg.png", Content, Vector2.Zero, false);
            itemSystems = new TextSystem[8];
            headerSystem = new TextSystem("profont.png", Content);
            setHeader();
            descriptionSystem = new TextSystem("profont.png", Content);
            descriptionLocation = new Vector2(350, 75);

            boop = Content.Load<SoundEffect>("Boop");

            backButton = new Sprite("shop_exit.png", Content, new Vector2(25, 675), false);
            purchaseButton = new Sprite("shop_purchase.png", Content, new Vector2(575, 675), false);
            ownedButton = new Sprite("shop_alreadypurchased.png", Content, new Vector2(575, 675), false);

            energyButton = new Sprite("shop_energyrestore.png", Content, new Vector2(105, 675), false);
            hpButton = new Sprite("shop_healthrestore.png", Content, new Vector2(259, 675), false);
            sellButton = new Sprite("shop_sellcargo.png", Content, new Vector2(413, 675), false);

            yesButton = new Sprite("shop_yes.png", Content, new Vector2(25, 550), false);
            noButton = new Sprite("shop_no.png", Content, new Vector2(80, 550), false);

            poorButton1 = new Sprite("shop_poor1.png", Content, Vector2.Zero, false);
            poorButton2 = new Sprite("shop_poor2.png", Content, Vector2.Zero, false);

            confirmSystem = new TextSystem("profont.png", Content);
            action = -1;

            itemNames = new string[] {
                "Power Drill",
                "Marsium Drill",
                "Reinforced Hull",
                "Impenetrable Hull",
                "Cargo Bay Expansion",
                "Cargo Teleportation Bay",
                "TESLA Battery",
                "Fusion Reactor"};
            costs = new int[] {
                350,
                5000,
                150,
                750,
                750,
                1500,
                750,
                1250
            };
            descriptions = new string[] {
                "\\1DRILLS UP TO 2x FASTER THAN\\nYOUR STANDARD DRILL!\\0\\nMade from a lightweight alloy,\\nthis drill generates double\\nthe power from the same\\namount of energy as a\\nregular drill. Great\\nfor tearing through tough\\nbedrock and solid chunks\\nof diamond!",
                "\\1THE DRILL YOUR MOTHER WARNED\\nYOU ABOUT!\\0\\nState-of-the-art drill technology\\nand chemically treated Marsium\\nstrength combine to bring\\nto you the most powerful\\ndrill ever made. Performs\\nthe work of eight standard drills\\nand without using a single\\ndrop extra of energy.\\nBuy now! What are you, poor?",
                "\\1NEVER FEAR A HIGH FALL AGAIN!\\0\\nStandard \\3Marstek\\0(tm)\\nEXC-07 hull reinforced with\\ndiamonds to provide enhanced\\nprotection against rough\\nlandings, pockets of lava, and\\neverything inbetween.",
                "\\1THE BEST ARMOR MONEY CAN BUY!\\0\\nAfter decades of advanced\\nresearch, top \\3Marstek\\0(tm)\\nscientists have yet to find a\\nprojectile that can damage this\\nhull! Hypertrains, space\\nelevators, and even FTL particles\\nfail to leave a dent!",
                "\\1WHAT'RE YOU GONNA DO WITH ALL\\nTHAT JUNK?\\0\\nStore it in this expanded\\ncargo bay! Double the\\ncapacity of the standard\\nmodel, this cargo expansion\\nprovides all the space you\\nneed to store Marsium on\\nlong mining expeditions.",
                "\\1A WHOLE NEW MEANING OF\\nCLOUD STORAGE!\\0\\nWhy store cargo on your ship,\\nwhen you could store it\\nin our warehouse! Just\\nthrow your cargo in and\\nhit the button, and\\nyour precious cargo will be\\ninstantly transported to\\nsecure \\3MarsTek\\0(tm) storage\\nfacilities. Don't worry, we\\npromise we'll give it back!",
                "\\1THE BATTERY OF THE FUTURE!\\0\\nEver since the days of the 21st\\ncentury, men have strived to\\nbuild the ultimate battery. Now,\\n\\3MarsTek\\0(tm) has done it! This\\nbattery harnesses the power of\\nquantum entanglement to deliver\\n5x the power of any other\\nbattery on the market.",
                "\\1IS THIS THING EVEN SAFE?\\0\\nOf course it is! Why carry\\naround a bulky inefficient\\nbattery when you could suck\\npower from your very own\\nsupergiant star! Provides\\nnear-limitless energy, and\\nwill only create a black hole if\\nyou forget to clean the\\nexhaust pipe."
            };

            selectedItem = -1;

            for (int x = 0; x < 8; x++)
            {
                itemSystems[x] = new TextSystem("profont.png", Content);
                itemSystems[x].resetString(new Vector2(25, 50 + (x * 50)));
                itemSystems[x].addString(itemNames[x]);
            }
        }
Exemplo n.º 2
0
 public Player(string filename, ContentManager Content, Vector2 vec, bool animated = true)
     : base(filename, Content, vec, animated)
 {
     velocity = new Vector2(0, 0);
     inventory = new Inventory();
 }