public override void LoadContent() { if (Camera == null) { Camera = new Camera2D(ScreenManager.GraphicsDevice); } iHUD = ScreenManager.Game.Services.GetService(typeof(IHUD)) as IHUD; iVisualiser = ScreenManager.Game.Services.GetService(typeof(IVisualiser)) as IVisualiser; //Swinger texture SwingerTexture = ScreenManager.Content.Load<Texture2D>("Common/slider"); //Halo texture HaloTexture = ScreenManager.Content.Load<Texture2D>("Common/halo"); //SpeedBoost texture SpeedBoostTexture = ScreenManager.Content.Load<Texture2D>("Common/slider"); //bullet texture BulletTexture = ScreenManager.Content.Load<Texture2D>("Common/bullet"); //////////////////////////////// //ObstacleManager //////////////////////////////// ObstacleManager = new ObstacleManager(); ObstacleManager.LoadContent(ScreenManager); base.LoadContent(); }
public void SetUp() { textReader = A.Fake <ITextReader>(); wordsFilter = A.Fake <IWordsFilter>(); wordsCounter = A.Fake <IWordsCounter>(); wordsToSizesConverter = A.Fake <IWordsToSizesConverter>(); ccl = A.Fake <ICloudLayouter>(); visualiser = A.Fake <IVisualiser>(); imageSaver = A.Fake <IFileSaver>(); }
//protected IReset iReset; public GameScreenBase(Game game) { //iReset = game.Services.GetService(typeof(IReset)) as IReset; iHUD = game.Services.GetService(typeof(IHUD)) as IHUD; iPopUp = game.Services.GetService(typeof(IPopUpManager)) as IPopUpManager; World = new World(new Vector2(0, 30)); iSoundEffect = game.Services.GetService(typeof(ISoundEffect)) as ISoundEffect; iScrollingBackground = game.Services.GetService(typeof(IScrollingBackground)) as IScrollingBackground; iVisualiser = game.Services.GetService(typeof(IVisualiser)) as IVisualiser; }
private void CloseCurrentFile() { _currentFile = null; if (_currentVisualiser == null) { return; } VisualiserPanel.Controls.Remove(_currentVisualiser.Container); _currentVisualiser.Close(); _currentVisualiser = null; }
public TagsCloudContainer(ITextReader textReader, IWordsFilter wordsFilter, IWordsCounter wordsCounter, IWordsToSizesConverter wordsToSizesConverter, ICloudLayouter ccl, IVisualiser visualiser, IFileSaver fileSaver, string output, string input ) { this.textReader = textReader; this.wordsFilter = wordsFilter; this.wordsCounter = wordsCounter; this.wordsToSizesConverter = wordsToSizesConverter; CCL = ccl; this.visualiser = visualiser; outputFile = output; inputFile = input; imageSaver = fileSaver; }
public Trail(Game game) : base(game) { Line = game.Content.Load<Texture2D>("Materials/line"); Sba = new SpriteBatch(game.GraphicsDevice); //get the visualizer service iVisualiser = game.Services.GetService(typeof(IVisualiser)) as IVisualiser; if (iVisualiser == null) throw new InvalidOperationException("iVisualizer Service not found."); iHUD = game.Services.GetService(typeof(IHUD)) as IHUD; ////get the PopupManger service //iPopUpManager = game.Services.GetService(typeof(IPopUpManager)) as IPopUpManager; //if (iPopUpManager == null) // throw new InvalidOperationException("iPopUpManager Serivce not found"); }
private void OpenFile(string path, bool switchEnvironment) { CloseCurrentFile(); _currentFile = path; if (switchEnvironment || _currentEnvironment == null) { _currentEnvironment = Environment.FromFile(path); RefreshTree(); } var vis = _visualisers.FirstOrDefault(x => x.Supports(path)); if (vis == null) { return; } vis.Container.Dock = DockStyle.Fill; VisualiserPanel.Controls.Add(vis.Container); vis.Open(_currentEnvironment, path); _currentVisualiser = vis; }
public InstanceController(string name, IMonitor monitor, IVisualiser visualiser) { Name = name; Monitor = monitor; Visualiser = visualiser; }