public NotePad(TextTyper typer) { this.typer = typer; screen = typer.Screen; position = new Position(); screenPosition = new Position(); }
public void DrawContent(SpriteBatch spriteBatch, Camera camera) { Guid playerId = this._components.Entities.Where(c => c.HasComponents(ComponentFlags.IS_PLAYER)).FirstOrDefault().Id; // Draw Dungeon DisplaySystem.DrawDungeon(camera, spriteBatch, this._dungeonGrid, this._spriteSheets[Constants.Sprites.TileSheetKey], this._gridCols, this._gridRows); // Draw Sprites this._components.Entities.ForEach((c) => { if (c.HasDrawableSprite()) { drawSequence[this._components.Displays[c.Id].Layer].Add(new Action(() => { DisplaySystem.DisplayEntity(spriteBatch, camera, this._components.Displays[c.Id], this._components.Positions[c.Id], this._spriteSheets[this._components.Displays[c.Id].SpriteSheetKey]); })); } if (c.HasDrawableLabel()) { DisplaySystem.DisplayLabel(spriteBatch, camera, this._components.Displays[c.Id], this._components.Labels[c.Id], this._components.Positions[c.Id], _labelFont, this._components.Positions[playerId], this._components.Displays[playerId]); } }); foreach (DisplayLayer key in drawSequence.Keys) { drawSequence[key].ForEach(x => x.Invoke()); drawSequence[key].Clear(); } }
public CursorController(DisplaySystem screen, int borderWidth, int borderHeight) { this.borderWidth = borderWidth; this.borderHeight = borderHeight; x = borderWidth; y = borderHeight; flicker = new Timer(flickerDelay, OnFlicker); this.screen = screen; }
public TextTyper(DisplaySystem screen, TerminalConsole console) { Screen = screen; Console = console; Cursor = new CursorController(screen, borderWidth, borderHeight); keys = new KeysController(this); DrawBorder(); }
public void DrawLevel(SpriteBatch spriteBatch, GraphicsDeviceManager graphics, Camera camera, ref GameSettings gameSettings) { DisplaySystem.DrawTiles(camera, spriteBatch, dungeonGrid, dungeonDimensions, DevConstants.Grid.CellSize, dungeonSprites, dungeonColorInfo, mapToPlayer, asciiDisplay, stateSpaceComponents); DisplaySystem.DrawAIFieldOfViews(stateSpaceComponents, camera, spriteBatch, UI, DevConstants.Grid.CellSize, dungeonGrid); if (gameSettings.ShowGlow) { DisplaySystem.DrawOutlines(stateSpaceComponents, camera, spriteBatch, UI, dungeonGrid); } DisplaySystem.DrawDungeonEntities(stateSpaceComponents, camera, spriteBatch, sprites, DevConstants.Grid.CellSize, dungeonGrid, asciiDisplay, dungeonColorInfo); LabelDisplaySystem.DrawString(spriteBatch, stateSpaceComponents, messageFont, camera); }
public void Init() { MyProjectPara = ProjectParaManager.Instance.GetProjectPara(0); LeftUpVisionPara = MyProjectPara.GetVisionPara("Ipad左上角拍照位"); RightDnVisionPara = MyProjectPara.GetVisionPara("Ipad右下角拍照位"); LeftUpView = DisplaySystem.GetViewControl("Ipad左上角拍照位1"); RightDnView = DisplaySystem.GetViewControl("Ipad右下角拍照位1"); VisionStateLeftUp = new VisionStateBase(LeftUpVisionPara, "Ipad左上角拍照位", LeftUpView); VisionStateLeftUp = new VisionStateBase(RightDnVisionPara, "Ipad右下角拍照位", RightDnView); VisionStateLeftUp.SetCamLight(); VisionStateRightDn.SetCamLight(); }
public void DrawContent(SpriteBatch spriteBatch, Camera camera) { // Draw Player DisplaySystem.DisplayEntity(spriteBatch, camera, this._player.DisplayInfo, this._player.PositionInfo, _placeholderSpritesheet); // Draw Creatures this._creatures.ForEach(c => DisplaySystem.DisplayEntity(spriteBatch, camera, c.DisplayInfo, c.PositionInfo, _placeholderSpritesheet)); // Draw Labels DisplaySystem.DisplayLabel(spriteBatch, camera, this._player.DisplayInfo, this._player.LabelInfo, this._player.PositionInfo, _placeholderLabel, this._player.PositionInfo, this._player.DisplayInfo); this._creatures.ForEach(c => DisplaySystem.DisplayLabel(spriteBatch, camera, c.DisplayInfo, c.LabelInfo, c.PositionInfo, this._placeholderLabel, this._player.PositionInfo, this._player.DisplayInfo)); #region debug #endregion }
void Start() { if (!Utils.init) { Utils.InitCharsValues(); } if (!CommandHelper.init) { CommandHelper.Init(); } _display = new DisplaySystem(GetComponent <MeshRenderer>()); _console = new TerminalConsole(_display, this); _console.SetSound(beep, dynamic); _keyboard = new KeyboardController(_console); _power = new TerminalPower(_console); }
public TerminalConsole(DisplaySystem screen, Terminal terminal) { _terminal = terminal; _screen = screen; Typer = new TextTyper(screen, this); _runEventsTimer = new Timer(_outDeltaTime, RunEvents); _buffer = new CommandBuffer(10); _dynamicCode = new DynamicCode(this, screen); _clipTimer = new Timer(_startClipDelay, StartClip); _tick = _tickDelay; _fileController = new FileController(this); _fileController.UpdateDirsList(); _fileController.UpdateFileList(); _runner = new CommandRunner(Typer, _fileController, this); Writter = new ConsoleWriter(Typer); Invoker = new ActionInvoker(); _screen.BlackScreen(); _screen.Apply(); }
private void InitCCDPanel() { DisplaySystem.InitCCDPanel(); DisplaySystem.AddPanelForCCDView("左侧下相机左上角拍照位", PadLeftUpPanel); DisplaySystem.AddPanelForCCDView("左侧下相机右下角拍照位", PadRightUpPanel); DisplaySystem.AddPanelForCCDView("右侧下相机左上角拍照位", PadLeftDnPanel); DisplaySystem.AddPanelForCCDView("右侧下相机右下角拍照位", PadRightDnPanel); DisplaySystem.AddPanelForCCDView("上相机左上角拍照位1", LeftTapeLeftPanel); DisplaySystem.AddPanelForCCDView("上相机右下角拍照位1", LeftTapeRightPanel); DisplaySystem.AddPanelForCCDView("上相机左上角拍照位2", RightTapeLeftPanel); DisplaySystem.AddPanelForCCDView("上相机右下角拍照位2", RightTapeRightPanel); DisplaySystem.AddPanelForCCDView("Ipad左上角拍照位1", FeederLeftUpPanel); DisplaySystem.AddPanelForCCDView("Ipad右下角拍照位1", FeederRightDnPanel); DisplaySystem.AddPanelForCCDView("Ipad左上角拍照位2", LoadingLeftUpPanel); DisplaySystem.AddPanelForCCDView("Ipad右下角拍照位2", LoadingRightPanel);; //DisplaySystem.AddPanelForCCDView(CameraTest.DnCam1, panelLeftDnCCD); //DisplaySystem.AddPanelForCCDView(CameraTest.DnCam2, panelRightDnCCD); }
private void InitSystems(RenderTarget target) { DisplaySystem displaySystem = new DisplaySystem(target); systems.Add(displaySystem); MoveSystem moveSystem = new MoveSystem(); systems.Add(moveSystem); CollisionSystem collisionSystem = new CollisionSystem(target); systems.Add(collisionSystem); ThrowingSystem throwingSystem = new ThrowingSystem(); systems.Add(throwingSystem); DilayedStartSystem dilayedStartSystem = new DilayedStartSystem(); systems.Add(dilayedStartSystem); }
public void Init() { MyProjectPara = ProjectParaManager.Instance.GetProjectPara(0); RightDnLeftVisionPara = MyProjectPara.GetVisionPara("右侧下相机左上角拍照位"); RightDnRightVisionPara = MyProjectPara.GetVisionPara("右侧下相机右下角拍照位"); UpCamLeftDnVisionPara = MyProjectPara.GetVisionPara("上相机左上角拍照位2"); UpCamRightDnVisionPara = MyProjectPara.GetVisionPara("上相机右下角拍照位2"); RightDnCamLeftStaView = DisplaySystem.GetViewControl("右侧下相机左上角拍照位"); RightDnCamRightStaView = DisplaySystem.GetViewControl("右侧下相机右下角拍照位"); UpCamLeftDnStaView = DisplaySystem.GetViewControl("上相机左上角拍照位2"); UpCamRightDnStaView = DisplaySystem.GetViewControl("上相机右下角拍照位2"); VisionStateUpCamLeftDn = new VisionStateBase(UpCamLeftDnVisionPara, "右侧下相机左上角拍照位", UpCamLeftDnStaView); VisionStateUpCamRightDn = new VisionStateBase(UpCamRightDnVisionPara, "右侧下相机右下角拍照位", UpCamRightDnStaView); VisionStateRightDnCamLeft = new VisionStateBase(RightDnLeftVisionPara, "上相机左上角拍照位2", RightDnCamLeftStaView); VisionStateRightDnCamRight = new VisionStateBase(RightDnRightVisionPara, "上相机右下角拍照位2", RightDnCamRightStaView); VisionStateUpCamLeftDn.SetCamLight(); VisionStateUpCamRightDn.SetCamLight(); VisionStateRightDnCamLeft.SetCamLight(); VisionStateRightDnCamRight.SetCamLight(); }
public void Init() { MyProjectPara = ProjectParaManager.Instance.GetProjectPara(0); LeftDnCamLeftVisionPara = MyProjectPara.GetVisionPara("左侧下相机左上角拍照位"); LeftDnCamRightVisionPara = MyProjectPara.GetVisionPara("左侧下相机右下角拍照位"); UpCamLeftUpVisionPara = MyProjectPara.GetVisionPara("上相机左上角拍照位1"); UpCamRightUpVisionPara = MyProjectPara.GetVisionPara("上相机右下角拍照位1"); LeftDnCamLeftView = DisplaySystem.GetViewControl("左侧下相机左上角拍照位"); LeftDnCamRightView = DisplaySystem.GetViewControl("左侧下相机右下角拍照位"); UpCamLeftUpView = DisplaySystem.GetViewControl("上相机左上角拍照位1"); UpCamRightUpCamView = DisplaySystem.GetViewControl("上相机右下角拍照位1"); VisionStateBaseUpCamLeftUp = new VisionStateBase(UpCamLeftUpVisionPara, "左侧下相机左上角拍照位", UpCamLeftUpView); VisionStateBaseUpCamRightUp = new VisionStateBase(UpCamRightUpVisionPara, "左侧下相机右下角拍照位", UpCamRightUpCamView); VisionStateDnLeftCamLeft = new VisionStateBase(LeftDnCamLeftVisionPara, "上相机左上角拍照位1", LeftDnCamLeftView); VisionStateDnLeftCamRight = new VisionStateBase(LeftDnCamRightVisionPara, "上相机右下角拍照位1", LeftDnCamRightView); VisionStateDnLeftCamLeft.SetCamLight(); VisionStateBaseUpCamRightUp.SetCamLight(); VisionStateDnLeftCamLeft.SetCamLight(); VisionStateDnLeftCamRight.SetCamLight(); }
public void DrawLevel(SpriteBatch spriteBatch, GraphicsDeviceManager graphics, Camera camera) { dungeonAlgorithm.DrawTiles(camera, spriteBatch, dungeonGrid, dungeonDimensions); DisplaySystem.DrawDungeonEntities(stateSpaceComponents, camera, spriteBatch, dungeonAlgorithm.GetCellsize()); }
public DynamicCode(TerminalConsole console, DisplaySystem display) { _console = console; _display = display; }