예제 #1
0
        void handleAuth(string val, string num)
        {
            betweenTurns = false;
            myTurnPending = val;
            playerNum = num;
            colliding = false;

            if (playerNum == "one")
            {
                DeathStars[0] = new DeathStar(new Vector2(100, 100), new Vector2(DS1Pos, 100), new Vector2(1), world, true);
            }
            else
            {
                DeathStars[1] = new DeathStar(new Vector2(100, 100), new Vector2(DS2Pos, 100), new Vector2(1), world, false);
            }
        }
예제 #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            Pixi = Content.Load<Texture2D>("pixi");
            backgroundImage = Content.Load<Texture2D>("background");
            planets = Content.Load<Texture2D>("planets");
            gameLogo = Content.Load<Texture2D>("logo");
            towers = Content.Load<Texture2D>("towers");
            ship = Content.Load<Texture2D>("corgiShip");
            menuSprites = Content.Load<Texture2D>("menusprites");
            turnSigns = Content.Load<Texture2D>("turnSigns");
            winner = Content.Load<Texture2D>("pixi");
            loser = Content.Load<Texture2D>("pixi");
            hearts = Content.Load<Texture2D>("hearts");
            youWin = Content.Load<Texture2D>("youWin");
            youLose = Content.Load<Texture2D>("youLose");
            spaceCorgi = Content.Load<Texture2D>("corgi_space");

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

            world = new World(new Vector2(0, 0)); // Grav 0 cause we in space hommie

            Menu.Load(Content);

            DeathStars[0] = new DeathStar(new Vector2(100, 100), new Vector2(DS1Pos, 100), new Vector2(3), world, true);
            DeathStars[1] = new DeathStar(new Vector2(100, 100), new Vector2(DS2Pos, 100), new Vector2(3), world, false);

            //CurrentProjectile = new Projectile(new Vector2(20, 20), new Vector2(400, 250), world, true);

            windowWidth = Window.ClientBounds.Width;
            windowHeight = Window.ClientBounds.Height;
        }