Exemplo n.º 1
0
 public void Initialize(Animation animation, Vector2 position)
 {
     CursorAnimation = animation;
     Position = position;
     Active = true;
     Console.WriteLine("Initialized" + Position + CursorAnimation);
 }
Exemplo n.º 2
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            tileWater = Content.Load<Texture2D>("tile_water");
            tileLand = Content.Load<Texture2D>("tile_land");
            tileBase = Content.Load<Texture2D>("wasteland_tile");

            Animation cursorAnimation = new Animation();
            cursorTexture = Content.Load<Texture2D>("cursors_64x64");
            cursorAnimation.Initialize(cursorTexture, new Vector2(0, 64), 64, 64, 12, 30, Color.White, 1f, true);
            cursor.Initialize(cursorAnimation, new Vector2(336, 130));
            font = Content.Load<SpriteFont>("gameFont");
            InitializeBoard();
            Services.AddService(typeof(SpriteBatch), spriteBatch);
            Console.WriteLine(cursorTexture);
        }