Exemple #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            test = Content.Load <Texture2D>("download");

            //load shaders
            effect    = Content.Load <Effect>("shader");
            greyscale = Content.Load <Effect>("greyscale");

            player = (Shuttle)manager.newObj(new Shuttle());



            font = Content.Load <SpriteFont>("font2");
        }
Exemple #2
0
        public override void collision(Obj collideWith)
        {
            base.collision(collideWith);

            Console.WriteLine("collided");

            if (collideWith.GetType() == typeof(Laser))
            {
                Laser l = (Laser)collideWith;
                if (l.firer.GetType() == typeof(Shuttle))
                {
                    Shuttle s = (Shuttle)l.firer;
                    s.score += 50;
                    this.manager.delObj(collideWith);
                    this.manager.delObj(this);
                }
            }
        }