コード例 #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            ShipTexture = Content.Load<Texture2D>("Ship");
            BulletTexture = Content.Load<Texture2D>("Bullet");

            //Initialize ships here, for loading less resources
            mainShip = new Player(new Vector2(graphics.PreferredBackBufferWidth / 4, graphics.PreferredBackBufferHeight / 2), graphics,ShipTexture,BulletTexture, spriteBatch);

            Conects = new ClientManager(mainShip);
        }
コード例 #2
0
        protected override void Initialize()
        {
            mainShip = new Player(new Vector2(graphics.PreferredBackBufferWidth / 4,graphics.PreferredBackBufferHeight/2),graphics);

            base.Initialize();
        }