Exemple #1
0
        public void FinishLoadAfterDeserialization(ref Camera camera, ContentManager content)
        {
            this.camera = camera;
            this.camera.Pos = new Vector2(512, 384);

            playerRight = content.Load<Texture2D>("Textures/PlayerRight");
            playerLeft = content.Load<Texture2D>("Textures/PlayerLeft");
            playerRightColorData = new Color[playerRight.Width * playerRight.Height];
            playerLeftColorData = new Color[playerLeft.Width * playerLeft.Height];
            playerRight.GetData<Color>(playerRightColorData);
            playerLeft.GetData<Color>(playerLeftColorData);
        }
Exemple #2
0
        public Player(ref Camera camera, ContentManager content)
        {
            this.camera = camera;
            this.camera.Pos = new Vector2(512, 384);

            playerRight = content.Load<Texture2D>("Textures/PlayerRight");
            playerLeft = content.Load<Texture2D>("Textures/PlayerLeft");

            playerRightColorData = new Color[playerRight.Width * playerRight.Height];
            playerLeftColorData = new Color[playerLeft.Width * playerLeft.Height];
            playerRight.GetData<Color>(playerRightColorData);
            playerLeft.GetData<Color>(playerLeftColorData);

            pos = new Vector2(0, 10 * TextureAtlas.TEXTURE_SIZE);
        }