/// <summary> /// Create the background for the version that has been loaded. /// </summary> private BackgroundScene createBackground() { commonResources.addResource(this.GetType().AssemblyQualifiedName, "EmbeddedResource", true); commonResources.initialize(); BackgroundScene background = new BackgroundScene("SourceBackground", "BodyAtlasBackground", 900, 500, 200, 1, 1); background.setVisible(true); return(background); }
protected override void Initialize() { base.Initialize(); this.scorePanel = this.EntityManager.Find <ScorePanel>("ScorePanel"); //Backscene var backContext = WaveServices.ScreenContextManager.FindContextByName("BackContext"); if (backContext != null) { this.backScene = backContext.FindScene <BackgroundScene>(); } this.blockBuilder = this.EntityManager.Find("BlockBuilder").FindComponent <BlockBuilderBehavior>(); this.squid = this.EntityManager.Find("Squid").FindComponent <SquidBehavior>(); }
/// <summary> /// Performs further custom initialization for this instance. /// </summary> /// <remarks> /// By default this method does nothing. /// </remarks> protected override void Initialize() { base.Initialize(); this.scene = (GamePlayScene)this.Owner.Scene; this.backScene = WaveServices.ScreenContextManager.FindContextByName("BackContext") .FindScene <BackgroundScene>(); this.soundManager = WaveServices.GetService <SoundManager>(); foreach (var block in this.avaibleBlocks) { this.Owner.AddChild(block.Entity); block.Entity.Enabled = false; } this.Reset(); }
public void DisplayScene00ExWithId(string sceneId, bool cancelPrevious, string background, string toptext, int topBrightness, int topOutlineBrightness, string bottomtext, int bottomBrightness, int bottomOutlineBrightness, int animateIn, int pauseTime, int animateOut) { _flexDMD.Post(() => { if (LOG_DEBUG) { log.Debug("DisplayScene00ExWithId '{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}' {12}", sceneId, cancelPrevious, background, toptext, topBrightness, topOutlineBrightness, bottomtext, bottomBrightness, bottomOutlineBrightness, animateIn, pauseTime, animateOut, DateTimeOffset.Now.ToUnixTimeMilliseconds()); } if (cancelPrevious && sceneId != null && sceneId.Length > 0) { var s = _queue.ActiveScene; if (s != null && s.Name == sceneId) { _queue.RemoveScene(sceneId); } } _scoreBoard.Visible = false; _queue.Visible = true; if (toptext != null && toptext.Length > 0 && bottomtext != null && bottomtext.Length > 0) { var fontTop = GetFont(_twoLinesFontTop.Path, topBrightness / 15f, topOutlineBrightness / 15f); var fontBottom = GetFont(_twoLinesFontBottom.Path, bottomBrightness / 15f, bottomOutlineBrightness / 15f); var scene = new TwoLineScene(ResolveImage(background, true), toptext, fontTop, bottomtext, fontBottom, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId); _queue.Enqueue(scene); } else if (toptext != null && toptext.Length > 0) { var font = GetFittedLabel(toptext, topBrightness / 15f, topOutlineBrightness / 15f).Font; var scene = new SingleLineScene(ResolveImage(background, true), toptext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId); _queue.Enqueue(scene); } else if (bottomtext != null && bottomtext.Length > 0) { var font = GetFittedLabel(bottomtext, bottomBrightness / 15f, bottomOutlineBrightness / 15f).Font; var scene = new SingleLineScene(ResolveImage(background, true), bottomtext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId); _queue.Enqueue(scene); } else { var scene = new BackgroundScene(ResolveImage(background, true), (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId); _queue.Enqueue(scene); } }); }
public void DisplayScene00ExWithId(string sceneId, bool cancelPrevious, string background, string toptext, int topBrightness, int topOutlineBrightness, string bottomtext, int bottomBrightness, int bottomOutlineBrightness, int animateIn, int pauseTime, int animateOut) { _flexDMD.Post(() => { if (cancelPrevious && sceneId != null && sceneId.Length > 0) { var s = _queue.ActiveScene; if (s != null && s.Name == sceneId) { _queue.RemoveScene(sceneId); } } _scoreBoard.Visible = false; _queue.Visible = true; if (toptext != null && toptext.Length > 0 && bottomtext != null && bottomtext.Length > 0) { var fontTop = GetFont(_twoLinesFontTop.Path, topBrightness / 15f, topOutlineBrightness / 15f); var fontBottom = GetFont(_twoLinesFontBottom.Path, bottomBrightness / 15f, bottomOutlineBrightness / 15f); var scene = new TwoLineScene(ResolveImage(background, true), toptext, fontTop, bottomtext, fontBottom, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId); _queue.Enqueue(scene); } else if (toptext != null && toptext.Length > 0) { var font = GetFittedLabel(toptext, topBrightness / 15f, topOutlineBrightness / 15f).Font; var scene = new SingleLineScene(ResolveImage(background, true), toptext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId); _queue.Enqueue(scene); } else if (bottomtext != null && bottomtext.Length > 0) { var font = GetFittedLabel(bottomtext, bottomBrightness / 15f, bottomOutlineBrightness / 15f).Font; var scene = new SingleLineScene(ResolveImage(background, true), bottomtext, font, (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, false, sceneId); _queue.Enqueue(scene); } else { var scene = new BackgroundScene(ResolveImage(background, true), (AnimationType)animateIn, pauseTime / 1000f, (AnimationType)animateOut, sceneId); _queue.Enqueue(scene); } }); }
public SimpleTankViewBackground(BackgroundScene scene, string illustrationName, Vector2 pos) : base(scene, illustrationName, pos) { uglyWorkAroundName = illustrationName; }
public void initializeControllers(BackgroundScene background, LicenseManager licenseManager) { //Background this.background = background; this.LicenseManager = licenseManager; atlasPluginManager = new AtlasPluginManager(this); atlasPluginManager.PluginLoadError += new Medical.AtlasPluginManager.PluginMessageDelegate(atlasPluginManager_PluginLoadError); atlasPluginManager.manageInstalledPlugins(); clipboard = new SaveableClipboard(); //Documents DocumentController = new DocumentController(); //MDI Layout mdiLayout = new MDILayoutManager(); //SceneView MyGUIInterface myGUI = MyGUIInterface.Instance; sceneViewController = new SceneViewController(mdiLayout, medicalController.EventManager, medicalController.MainTimer, medicalController.PluginManager.RendererPlugin.PrimaryWindow, myGUI.OgrePlatform.RenderManager, background); sceneViewController.WindowCreated += sceneViewController_WindowCreated; sceneViewController.WindowDestroyed += sceneViewController_WindowDestroyed; sceneViewController.DefaultBackgroundColor = new Color(0.274f, 0.274f, 0.274f); sceneStatsDisplayManager = new SceneStatsDisplayManager(sceneViewController, OgreInterface.Instance.OgrePrimaryWindow.OgreRenderTarget); sceneStatsDisplayManager.StatsVisible = MedicalConfig.EngineConfig.ShowStatistics; MedicalConfig.EngineConfig.ShowStatsToggled += engineConfig => sceneStatsDisplayManager.StatsVisible = engineConfig.ShowStatistics; lightManager = PluginManager.Instance.RendererPlugin.createSceneViewLightManager(); //Measurement grid measurementGrid = new MeasurementGrid("MeasurementGrid", sceneViewController); SceneUnloading += measurementGrid.sceneUnloading; SceneLoaded += measurementGrid.sceneLoaded; //Image Renderer imageRenderer = new ImageRenderer(medicalController, sceneViewController, idleHandler); imageRenderer.Background = background; imageRenderer.ImageRenderStarted += measurementGrid.ScreenshotRenderStarted; imageRenderer.ImageRenderCompleted += measurementGrid.ScreenshotRenderCompleted; //Anatomy Controller anatomyController = new AnatomyController(); //Medical states medicalStateController = new MedicalStateController(imageRenderer, medicalController); SceneLoaded += medicalStateController.sceneLoaded; SceneUnloading += medicalStateController.sceneUnloading; //Movement sequences movementSequenceController = new MovementSequenceController(medicalController); this.SceneLoaded += movementSequenceController.sceneLoaded; musclePositionController = new MusclePositionController(medicalController.MainTimer, this); SceneLoaded += SleepyActorRepository.SceneLoaded; SceneUnloading += SleepyActorRepository.SceneUnloading; //Props propFactory = new PropFactory(this); //Timeline timelineController = new TimelineController(this); viewHostFactory = new MyGUIViewHostFactory(mdiLayout); mvcCore = new AnomalousMvcCore(this, viewHostFactory); //Patient data patientDataController = new PatientDataController(this); //Tasks taskController = new TaskController(); anatomyTaskManager = new AnatomyTaskManager(taskController, guiManager); //Coroutine Coroutine.SetTimer(medicalController.MainTimer); //Notifications notificationManager = new NotificationGUIManager(); layerController = new LayerController(); //Create virtual texture manager virtualTextureSceneViewLink = new VirtualTextureSceneViewLink(this); }