private void InspectEntity(SEntityId entityId) { CEngine engine = CEngine.Instance; engine.Dispatch(EEngineUpdatePriority.BeginFrame, () => { CUpdateScheduler scheduler = engine.CurrentWorld.UpdateScheduler; if (m_updateScope != null && m_updateScope.IsConnected()) { scheduler.Disconnect(m_updateScope); } CEntity entity = entityId.GetEntity(); if (entity != null) { m_selectedObject = new CEditableObject(entityId); m_updateScope = scheduler.Connect(UpdateCallback, EUpdatePriority.ResourceLoading); Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (Action)(() => { m_desiredTarget = new CEditableObject(entityId); UnmarkEverything(); MarkEntityInInspector(true); })); } }); }
public override void TickSync() { var temp = mCLDB_Snapshot[0]; mCLDB_Snapshot[0] = mCLDB_Snapshot[1]; mCLDB_Snapshot[1] = temp; temp = mCLDB_Copy[0]; mCLDB_Copy[0] = mCLDB_Copy[1]; mCLDB_Copy[1] = temp; CEngine.SDK_RResourceSwapChain_TickSwap(CEngine.Instance.RenderContext.CoreObject); base.TickSync(); Camera.ClearAllRenderLayerData(); }
public override void PostWorldLoad() { base.PostWorldLoad(); m_world = CEngine.Instance.CurrentWorld; CEngine engine = CEngine.Instance; engine.Dispatch(EEngineUpdatePriority.BeginFrame, () => { CEntity entity = m_world.SpawnEntity <CEntity>(); entity.AddComponent <CSceneComponent>(true, true); m_world.DestroyEntity(entity); }); m_hostControl.SetWorld(m_world); }
private void InspectComponent(SEntityComponentId componentId) { bool bUpdateInspectorObjectList = ShouldUpdateInspectorList(componentId); CEngine engine = CEngine.Instance; CWorldOutlinerViewModel worldOutliner = CWorkspace.Instance.GetTool <CWorldOutlinerViewModel>(); engine.Dispatch(EEngineUpdatePriority.BeginFrame, () => { CUpdateScheduler scheduler = engine.CurrentWorld.UpdateScheduler; if (m_updateScope != null && m_updateScope.IsConnected()) { scheduler.Disconnect(m_updateScope); } CEntityComponent component = componentId.GetComponent(); if (component != null) { m_selectedObject = new CEditableObject(componentId); m_updateScope = scheduler.Connect(UpdateCallback, EUpdatePriority.ResourceLoading); if (bUpdateInspectorObjectList) { UpdateEntityInformation_EngineThread(new SEntityId(component.Owner.Id)); } worldOutliner.PickingComponentId.GetComponent <CScenePickingComponent>().Pick(component as CSceneComponent); Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (Action)(() => { m_desiredTarget = new CEditableObject(componentId); UnmarkEverything(); MarkComponentInInspector(componentId, true); })); } else { Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (Action)(() => { m_desiredTarget = null; UnmarkEverything(); })); } }); }
internal void CreateEngineAndShow() { RenderFormSurface surface = new RenderFormSurface(this); CLogger logger = new CLogger("game.log", true, true, true); CInitializer initializer = new CInitializer(); initializer.Add("Viewport"); initializer.Add <IRenderSurface>(surface); initializer.Add(logger); CEngine.Create(initializer, true); CKlaxScriptRegistry dummy = CKlaxScriptRegistry.Instance; Input.SetReferenceHWND(Handle); Input.CursorVisibilitySetter = (arg) => { if (arg) { Cursor.Show(); } else { Cursor.Hide(); } }; Width = WindowWidth; Height = WindowHeight; CEngine.Instance.Dispatch(EEngineUpdatePriority.BeginFrame, () => { CEngine.Instance.LoadWorld(null, WorldLoadedCallback); }); Point size = new Point(ClientSize.Width, ClientSize.Height); System.Drawing.Point topLeft = PointToScreen(new System.Drawing.Point(0, 0)); IntPtr handlePtr = Handle; CRenderer renderer = CRenderer.Instance; CEngine.Instance.Dispatch(EEngineUpdatePriority.BeginFrame, () => { renderer.Resize(size.X, size.Y, topLeft.X, topLeft.Y, handlePtr); CEngine.Instance.CurrentWorld.StartPlayMode(); }); }
static void Main(string[] args) { browser = new IE(); mailBrowser = new IE(); cEngine = new CEngine(); initialiseWordLists(); while (true) { //connectToRandomProxy(); changeHMAIP(); openWebsite("http://guerrillamail.com", 1); logOutFromTwitch(); refreshMail(); nextUsername = generateUsername(); registerAccount(); verifyEmail(); getOAuth(); saveAccount(); } }
private void InitializeEngine() { CInitializer initializer = new CInitializer(); CLogger editorLogger = new CLogger("editor.log", true, true, true); initializer.Add(editorLogger); CEngine.Create(initializer, true); Input.CursorVisibilitySetter = (arg) => { Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, (Action)(() => { if (arg) { System.Windows.Forms.Cursor.Show(); } else { System.Windows.Forms.Cursor.Hide(); } })); }; }
public XmlEngineBuilder(CEngine xml) { engineXml = xml; engineNodes = new Dictionary <string, CNode>(); }