我正在制作一个 Level.cs 类,它应该将背景图像 (texture2d) 作为 Level 类构造函数的参数。但它不会接受变量'back'..我该怎么办?
public Level(Texture2D back ,ContentManager content, EventHandler ScreenEvent, Microsoft.Xna.Framework.Game game) : base(ScreenEvent)
{
background = content.Load<Texture2D>(back);
backgroundVector = new Vector2(-1150, 0);
velocity = 5.0f;
ground = 508;
graphics = new GraphicsDeviceManager(game);
}
最好的问候丹尼。