I have project, inside there is background.cs class and game1.cs class, thats my background.cs class code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
namespace Rocket
{
class Backgrounds
{
public Texture2D texture;
public Rectangle rectangle;
public void Draw(SpriteBatch spriteBatch){
spriteBatch.Draw(texture, rectangle, Color.White);
}
class Scrolling : Backgrounds{
public Scrolling(Texture2D newTexture, Rectangle newRectangle){
texture = newTexture;
rectangle = newRectangle;
}
public void Update(){
rectangle.X -= 3;
}
}
}
}
and thats game1.cs class code (starting where I get error):
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Rocket
{
/// <summary>
/// This is the main type for your game
/// </summary>
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Scrolling scrolling1;
Scrolling scrolling2;
' So, Scrolling scrolling1; is underlined, (as second one), it says that class Scrolling could not be found, but it exists! I am noob in XNA and I cant find why it isn't working. any help will be ok!