public void GameStartUp() { UICore = (GameObject.Instantiate(Resources.Load("Prefabs/GUI/UIRoot")) as GameObject).GetComponent<UICore>(); GameState = new GameStateHandler(); GameState.Initialize(); PlayerInfo = new PlayerInfo(); }
public Scene(System.Windows.Forms.Control container, UICore.Connection connection) { Container = container; Width = Container.ClientSize.Width; Height = Container.ClientSize.Height; InitD3D(); m_currentView = new ThreadView(connection, this); m_currentView.UpdateData(); }
private void glControl_MouseDown(object sender, MouseEventArgs e) { if (ModuleHandler._CoreModules.Keys.Contains("UITextures")) { CoreModule coreModule = null; ModuleHandler._CoreModules.TryGetValue("UITextures", out coreModule); UICore coreMod = (UICore)coreModule; coreMod.OnClick(e.X, e.Y); } GameCore.MouseDown(e.X, e.Y); }
// Constructors protected CoreButton(IButtonSlot parent, TIH action, string label = "", Color?tint = null) { ButtonBase = parent; Action = action; Label = label; Hooks = new ButtonHooks(); Services = new Dictionary <string, ButtonService>(); Tint = tint ?? Color.White; ID = UICore.GenerateHoverID(); }
public OpenToolButton(string name, string buttonText, Action onClickedAction) { InitializeComponent(); groupBox1.Text = name; btnOpenTool.Name = name; btnOpenTool.Text = buttonText; btnOpenTool.Click += delegate { onClickedAction.Invoke(); }; UICore.SetRTCColor(UICore.GeneralColor, this); }
public void GameStartUp() { ObjectPool = (GameObject.Instantiate(Resources.Load("Prefabs/System/GameObjectPool")) as GameObject).GetComponent <GameObjectPool>(); IOManager = (GameObject.Instantiate(Resources.Load("Prefabs/System/IOManager")) as GameObject).GetComponent <IOManager>(); UICore = (GameObject.Instantiate(Resources.Load("Prefabs/UI/UIRoot")) as GameObject).GetComponent <UICore>(); GameState = new GameStateHandler(); GameState.Initialize(); PlayerInfo = new PlayerInfo(); EventManager = new EventManager(); }
public void GameStartUp() { ObjectPool = (GameObject.Instantiate(Resources.Load("Prefabs/System/GameObjectPool")) as GameObject).GetComponent<GameObjectPool>(); IOManager = (GameObject.Instantiate(Resources.Load("Prefabs/System/IOManager")) as GameObject).GetComponent<IOManager>(); UICore = (GameObject.Instantiate(Resources.Load("Prefabs/UI/UIRoot")) as GameObject).GetComponent<UICore>(); GameState = new GameStateHandler(); GameState.Initialize(); PlayerInfo = new PlayerInfo(); EventManager = new EventManager(); }
public override void Execute(AgentBase agent) { base.Execute(agent); if (agent.Behavior.GetType() == typeof(PathFollowingBehaviour)) { var tempBehaviour = (PathFollowingBehaviour)agent.Behavior; if (tempBehaviour.Finished()) { UICore.GetInstance().Log(agent.Name + ": I need to repair my ride.."); agent.StateMachine.ChangeState(new RepairingVehicle()); } } }
public override void Execute(AgentBase agent) { base.Execute(agent); if (agent.Behavior.GetType() == typeof(PathFollowingBehaviour)) { var tempBehaviour = (PathFollowingBehaviour)agent.Behavior; if (tempBehaviour.Finished()) { agent.StateMachine.ChangeState(new ReachedFinish()); UICore.GetInstance().Log(agent.Name + ": I finished a lap!"); } } }
public void OnEnable() { UICore tempScript = (UICore)(serializedObject.targetObject); if (tempScript != null) { _script = tempScript; _gameObject = tempScript.gameObject; } else { Debug.LogError("serializedObject null"); } }
static int BindAllWidgets(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UICore obj = (UICore)ToLua.CheckObject <UICore>(L, 1); obj.BindAllWidgets(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int UnInit(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UICore obj = (UICore)ToLua.CheckObject <UICore>(L, 1); LuaTable arg0 = ToLua.CheckLuaTable(L, 2); obj.UnInit(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int BindingWidget(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UICore obj = (UICore)ToLua.CheckObject <UICore>(L, 1); LuaTable arg0 = ToLua.CheckLuaTable(L, 2); UICore.Param arg1 = (UICore.Param)ToLua.CheckObject <UICore.Param>(L, 3); obj.BindingWidget(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_cacheParam(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UICore obj = (UICore)o; System.Collections.Generic.List <UICore.Param> ret = obj.cacheParam; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index cacheParam on a nil value")); } }
internal void Draw(ScrollViewStyle scroll, UICore ui) { _foldOut = EditorGUILayout.Foldout(_foldOut, "ScrollView", true); if (_foldOut) { EditorGUI.indentLevel++; EditorGUI.BeginChangeCheck(); scroll.useHorizontal = EditorGUILayout.Toggle("Use Horizontal", scroll.useHorizontal); scroll.horizontalSpace = EditorGUILayout.DelayedFloatField("Horizontal Space", scroll.horizontalSpace); scroll.horizontalBarVisibility = (ScrollRect.ScrollbarVisibility) EditorGUILayout.EnumPopup("Horizontal Visibility", scroll.horizontalBarVisibility); scroll.horizontalDirecion = (Scrollbar.Direction) EditorGUILayout.EnumPopup("Horizontal Direction", scroll.horizontalDirecion); scroll.horizontalPlacement = (BaseScrollPane.HorizontalBarPlacement) EditorGUILayout.EnumPopup("Horizontal Placement", scroll.horizontalPlacement); DrawSeperator(); scroll.useVertical = EditorGUILayout.Toggle("Use Vertical", scroll.useVertical); scroll.verticalSpace = EditorGUILayout.DelayedFloatField("Vertical Space", scroll.verticalSpace); scroll.verticalBarVisibility = (ScrollRect.ScrollbarVisibility) EditorGUILayout.EnumPopup("Vertical Visibility", scroll.verticalBarVisibility); scroll.verticalDirection = (Scrollbar.Direction) EditorGUILayout.EnumPopup("Vertical Direction", scroll.verticalDirection); scroll.verticalPlacement = (BaseScrollPane.VerticalBarPlacement) EditorGUILayout.EnumPopup("Horizontal Placement", scroll.verticalPlacement); DrawSeperator(); scroll.movementType = (ScrollRect.MovementType)EditorGUILayout.EnumPopup("Movement Type", scroll.movementType); scroll.elasticity = EditorGUILayout.DelayedFloatField("Elasticity", scroll.elasticity); scroll.inertia = EditorGUILayout.Toggle("Inertia", scroll.inertia); scroll.decelerationRate = EditorGUILayout.DelayedFloatField("Deceleration Rate", scroll.decelerationRate); scroll.sensitivity = EditorGUILayout.DelayedFloatField("Sensitivity", scroll.sensitivity); DrawSeperator(); scroll.stepSize = EditorGUILayout.Vector2Field("Scroll Step Size", scroll.stepSize); scroll.stepSensitivity = EditorGUILayout.Vector2Field("Step Sensitivity", scroll.stepSensitivity); scroll.maxSteps = EditorGUILayout.IntSlider("Max Steps", scroll.maxSteps, 1, 1000); if (EditorGUI.EndChangeCheck()) { EditorUtility.SetDirty(ui); } EditorGUI.indentLevel--; } }
static int set_cacheParam(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UICore obj = (UICore)o; System.Collections.Generic.List <UICore.Param> arg0 = (System.Collections.Generic.List <UICore.Param>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <UICore.Param>)); obj.cacheParam = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index cacheParam on a nil value")); } }
static int RegisterCallBack(IntPtr L) { try { ToLua.CheckArgsCount(L, 5); UICore obj = (UICore)ToLua.CheckObject <UICore>(L, 1); LuaTable arg0 = ToLua.CheckLuaTable(L, 2); string arg1 = ToLua.CheckString(L, 3); UnityEngine.GameObject arg2 = (UnityEngine.GameObject)ToLua.CheckObject(L, 4, typeof(UnityEngine.GameObject)); UnityEngine.EventSystems.EventTriggerType arg3 = (UnityEngine.EventSystems.EventTriggerType)ToLua.CheckObject(L, 5, typeof(UnityEngine.EventSystems.EventTriggerType)); obj.RegisterCallBack(arg0, arg1, arg2, arg3); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private static bool CheckInUICore(Transform tran, UICore uc) { foreach (UICore.Param p in uc.allParam) { if (p.transform == tran) { return(true); } } foreach (UICore.Param p in uc.param) { if (p.transform == tran) { return(true); } } foreach (UICore.ParamArray pa in uc.paramArray) { if (pa.first != null) { if (pa.parent != null && pa.parent.transform == tran) { return(true); } if (pa.first.root != null && pa.first.root.transform == tran) { return(true); } foreach (UICore.Param p in pa.first.childs) { if (p.transform == tran) { return(true); } } } } return(false); }
public static void UpdateUICoreRef(Transform tran, UICore uc) { foreach (UICore.Param p in uc.allParam) { if (p.transform == tran && p.type == UICore.ComponentType.Texture) { p.type = UICore.ComponentType.Sprite; } } foreach (UICore.Param p in uc.param) { if (p.transform == tran && p.type == UICore.ComponentType.Texture) { p.type = UICore.ComponentType.Sprite; } } foreach (UICore.ParamArray pa in uc.paramArray) { if (pa.first != null) { if (pa.parent != null && pa.parent.transform == tran && pa.parent.type == UICore.ComponentType.Texture) { pa.parent.type = UICore.ComponentType.Sprite; } if (pa.first.root != null && pa.first.root.transform == tran && pa.first.root.type == UICore.ComponentType.Texture) { pa.first.root.type = UICore.ComponentType.Sprite; } foreach (UICore.Param p in pa.first.childs) { if (p.transform == tran && p.type == UICore.ComponentType.Texture) { p.type = UICore.ComponentType.Sprite; } } } } }
static int BindAllWidgetsHelper(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 4) { UICore obj = (UICore)ToLua.CheckObject <UICore>(L, 1); UICore.Param arg0 = (UICore.Param)ToLua.CheckObject <UICore.Param>(L, 2); string arg1 = ToLua.CheckString(L, 3); UnityEngine.Transform arg2 = (UnityEngine.Transform)ToLua.CheckObject <UnityEngine.Transform>(L, 4); UICore.Param o = obj.BindAllWidgetsHelper(arg0, arg1, arg2); ToLua.PushObject(L, o); return(1); } else if (count == 5) { UICore obj = (UICore)ToLua.CheckObject <UICore>(L, 1); UICore.Param arg0 = (UICore.Param)ToLua.CheckObject <UICore.Param>(L, 2); string arg1 = ToLua.CheckString(L, 3); UnityEngine.Transform arg2 = (UnityEngine.Transform)ToLua.CheckObject <UnityEngine.Transform>(L, 4); bool arg3 = LuaDLL.luaL_checkboolean(L, 5); UICore.Param o = obj.BindAllWidgetsHelper(arg0, arg1, arg2, arg3); ToLua.PushObject(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UICore.BindAllWidgetsHelper")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public Loader(string[] args) { if (RTCV.NetCore.NetCore_Extensions.IsGDIEnhancedScalingAvailable()) { RTCV.NetCore.NetCore_Extensions.SetThreadDpiAwarenessContext(RTCV.NetCore.NetCore_Extensions.DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED); Application.EnableVisualStyles(); } InitializeComponent(); //Create the RTC log next to the executable string rtcLogPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "RTC", "RTC_LOG.txt"); RTCV.NetCore.NetCore_Extensions.ConsoleHelper.CreateConsole(rtcLogPath); if (args.Contains("-CONSOLE")) { RTCV.NetCore.NetCore_Extensions.ConsoleHelper.ShowConsole(); } else { RTCV.NetCore.NetCore_Extensions.ConsoleHelper.HideConsole(); } UICore.Start(this); }
public void InitJavascriptObject(UICore core) { this.Core = core; }
public void MapCounter(UICore.Counter counter) { }
public void Enter(AgentBase agent) { UICore.GetInstance().Log(agent.Name + ": I'm fixing my ride.."); UICore.GetInstance().Log(agent.Name + ": My wear is " + agent.Wear); }
public void Exit(AgentBase agent) { UICore.GetInstance().Log(agent.Name + ": I've repaired my ride!"); UICore.GetInstance().Log(agent.Name + ": My wear is now " + agent.Wear); }
public void MapFunction(UICore.FunctionInfo funcInfo) { }
public void MapClass(UICore.ClassInfo classInfo) { }
public void ParseSample(UICore.Messages.Sample sample) { }
public void OnDisable() { _script = null; _gameObject = null; }
// Use this for initialization void Awake() { _instance = this; Load(); }