Inheritance: SpaceCats_v2.GameObject
Ejemplo n.º 1
0
 public PlayerShip(PlayerShip p)
     : base(p)
 {
     z_typeID = PlayerShip.ObjectTypeID;
     z_health = p.z_health;
     z_lives = p.z_lives;
     z_score = p.z_score;
     z_shotsTaken = p.z_shotsTaken;
     z_hits = p.z_hits;
 }
Ejemplo 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.
            z_spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            ObjectFactory.Initialize();
            ObjectFactory.AddObjectType(GameObject.ObjectTypeID, new GameObject(this, Content.Load<Texture2D>("Images\\ship1")), true, 10);
            ObjectFactory.AddObjectType(PlayerShip.ObjectTypeID, new PlayerShip(this), true, 5);
            ObjectFactory.AddObjectType(Asteroid.ObjectTypeID, new Asteroid(this), true, 10);
            z_gameStateManager.LoadContent();
            z_stageManager.LoadContent();
            z_missionManager.LoadContent();
            z_menuManager.LoadContent();
            z_audioManager.LoadContent();
            //            z_playerManager.LoadContent();
            z_blackDot = Content.Load<Texture2D>("Images\\Black Dot");

            Player1 = new PlayerShip(this); // create this here because it loads resources
        }