public Options(TextManager textManager, ScreenCanvas canvas) { _textManager = textManager; _canvas = canvas; _cache = new CacheManager( new ScoreManager(new TextManager(_canvas)) , null , new AsteroidBelt(15, Asteroid.ASTEROID_SIZE.SMALL) , new List <Bullet>() ); }
public TitleScreen(TextDraw textDraw, ScreenCanvas canvas) : base() { _textDraw = textDraw; _canvas = canvas; InitTitleScreen(); _cache = new CacheManager( new ScoreManager(new TextDraw(_canvas)) , null , new AsteroidBelt(15, Asteroid.ASTEROID_SIZE.SMALL) , new List <Bullet>() ); }
/// <summary> /// Creates a new instance of <see cref="TitleScreen"/>. /// </summary> /// <param name="textManager"><see cref="TextManager"/> to write text too.</param> /// <param name="canvas"><see cref="ScreenCanvas"/> to draw on.</param> public TitleScreen(TextManager textManager, ScreenCanvas canvas) { _textManager = textManager; _canvas = canvas; InitTitleScreen(); _cache = new CacheManager( new ScoreManager(new TextManager(_canvas)) , null , new AsteroidBelt(15, Asteroid.AsteroidSize.Small) , new List <Bullet>() ); }
/// <summary> /// Creates new instance of <see cref="Game"/>. /// </summary> /// <param name="score"><see cref="ScoreManager"/> to keep track of points.</param> /// <param name="textDraw"><see cref="TextManager"/> to write text objects to the <see cref="ScreenCanvas"/>.</param> /// <param name="canvas"><see cref="ScreenCanvas"/> to draw objects on.</param> public Game(ScoreManager score, TextManager textDraw, ScreenCanvas canvas) { _score = score; _textDraw = textDraw; _currentLevel = AsteroidStartCount; _inProcess = true; //Setup caches with a new ship _cache = new CacheManager( _score , new Ship() , new AsteroidBelt(_currentLevel) , Enumerable.Range(0, 4).Select(i => new Bullet()).ToList() ); _collisionManager = new CollisionManager(_cache); _drawingManager = new DrawingManager(_cache, canvas); //Unpaused _paused = false; _pauseTimer = PauseInterval; }
/// <summary> /// Creates new instance of <see cref="Game"/>. /// </summary> /// <param name="score"><see cref="ScoreManager"/> to keep track of points.</param> /// <param name="textDraw"><see cref="TextManager"/> to write text objects to the <see cref="ScreenCanvas"/>.</param> /// <param name="canvas"><see cref="ScreenCanvas"/> to draw objects on.</param> public Game(ScoreManager score, TextManager textDraw, ScreenCanvas canvas) { _score = score; _textDraw = textDraw; _canvas = canvas; _currentLevel = ASTEROID_START_COUNT; _inProcess = true; //Setup caches with a new ship _cache = new CacheManager( _score , new Ship() , new AsteroidBelt(_currentLevel) , Enumerable.Range(0, 4).Select(i => new Bullet()).ToList() ); _collisionManager = new CollisionManager(_cache); _drawingManager = new DrawingManager(_cache, _canvas); //Unpaused _paused = false; _pauseTimer = PAUSE_INTERVAL; }
public TextDraw(ScreenCanvas canvas) : base() { _screenCanvas = canvas; }