Example #1
0
        public Player(Texture2D bod, Vector2 posit, Texture2D FootprintText, TextBox txBx, Texture2D HealthBarTexture)
        {
            body = bod;
            pos = posit;
            statSpeed = 1;
            rand = new Random(1337); // Turns out you can seed randoms to get an offset
            DefaultHP = 100 + rand.Next(0, 50);
            DefaultStamina = 100 + rand.Next(0, 50);
            Stamina = DefaultStamina;
            HP = DefaultHP;
            HealthBarText = HealthBarTexture;
            RecBarSize = new Rectangle(0, -2 ,HP, HealthBarText.Height);
            StamBarSize = new Rectangle(600-Stamina, -2, Stamina, HealthBarText.Height);
            Running = false;
            StamRegenSpeed = 1;
            StamRegenAmount = 5;
            InMotion = false;

            Textbox = txBx;

            footText = FootprintText;

            FootPrints = new ArrayList();
            foot = true;
            footSide = SpriteEffects.FlipVertically;
        }
Example #2
0
        protected override void LoadContent()
        {
            bgs = Content.Load<Song>("main");

            FootTextu = Content.Load<Texture2D>("feet");
            Char_bod = Content.Load<Texture2D>("fullbody");

            TextHealthBar = Content.Load<Texture2D>("healthbar-plain");
            TextStamBar = Content.Load<Texture2D>("staminabar-plain");

            Ply = new Player(Char_bod, new Vector2(300, 200),FootTextu, Textbox, TextHealthBar);

            boardtext = Content.Load<Texture2D>("bottomtext");

            snow = Content.Load<Texture2D>("snow1");
            snowing = new FallingSnow(snow, 600);

            overlay = Content.Load<Texture2D>("snowground-vignette");
            groundplate = Content.Load<Texture2D>("ground");

            SpriFont = Content.Load<SpriteFont>("SpriteFont1");

            Textbox = new TextBox(boardtext,SpriFont);
            Textbox.ShowText("???: W-Where the f**k am I...", 0, 240,Color.White);

            spriteBatch = new SpriteBatch(GraphicsDevice);
        }