Я пытаюсь составить список для хранения всех своих экземпляров моего Trail
класса, но он выдаёт мне следующую ошибку:
Несовместимая доступность: тип поля 'System.Collections.Generic.list ' менее доступен, чем поле 'Jumper.Main.trails'
Я использую следующую строку кода (там, где происходит ошибка):
public static List<Trail> trails = new List<Trail>();
вот мой код Trail.cs:
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 Jumper
{
public class Trail
{
public int width;
public static float angle;
//The current position of the Sprite
public Vector2 pos = Vector2.Zero;
//The texture object used when drawing the sprite
public Texture2D trail;
public Trail()
{
angle = Player.rotation;
pos.X = Player.pos.X;
pos.Y = Player.pos.Y;
}
//Load the texture for the sprite using the Content Pipeline
public void LoadContent(ContentManager theContentManager, string theAssetName)
{
trail = theContentManager.Load<Texture2D>(theAssetName);
}
//Draw the sprite to the screen
public void Draw(SpriteBatch theSpriteBatch)
{
theSpriteBatch.Draw(trail, new Vector2(pos.X, pos.Y), Color.White);
}
public void updateTrail()
{
}
}
}
Что я делаю не так?