public void T_EngineThread() { //MCommand.MCommands.BindCommands(); EditorSubsystemManaged.getInstance().RegisterHooks(); MochaCore.CoffeeConstructor.Start(true, 640, 480, false); while (true) { MochaCore.CoffeeConstructor.Run(); EditorSubsystemManaged.getInstance().Tick(); //force run this after the Script Subsystem } }
//Add to object and to children visually public void Virtual_AddChild(GameObject child_obj) { if (GetDataContext() == null) { return; } if (Children == null) { Children = new ObservableCollection <GameObject>(); } IntermediateSource.Add(child_obj); MochaInterface.CTransform this_trans = GetDataContext().transform; EditorSubsystemManaged.getInstance().QueueAction(new Action(() => { child_obj.transform.SetParent(this_trans); })); }
//Detach the object visually public void Virtual_DetachChild(HierarchyControl child) { if (child.GetDataContext() == null) { return; } if (Children == null) { Children = new ObservableCollection <GameObject>(); } GameObject child_obj = child.GetDataContext(); IntermediateSource.Add(child_obj); EditorSubsystemManaged.getInstance().QueueAction(new Action(() => { child_obj.transform.SetParent(null); })); }