Esempio n. 1
0
        public void playerCollision(ref Player target)
        {
            if (target!=null && CheckCollision(target))
            {

                destroy = true;

                target.ShotCollision();

            }
        }
Esempio n. 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);

            p1 = new Player(2, Content.Load<Texture2D>("PModel1"), new Vector2(50, 50));

            //exampleshot[0] = new HorizontalShot(new Vector2(400, 200), Content.Load<Texture2D>("ExampleShot"), 1,1);
            exampleshot[1] = new AngleShot(new Vector2(400, 200), Content.Load<Texture2D>("ExampleShot"), 1, 1, 135);
            exampleshot[2] = new AngleShot(new Vector2(400, 200), Content.Load<Texture2D>("ExampleShot"), 1, 1, 45);

            // TODO: use this.Content to load your game content here
        }