Ejemplo n.º 1
0
    public void GameStartUp()
    {
        UICore = (GameObject.Instantiate(Resources.Load("Prefabs/GUI/UIRoot")) as GameObject).GetComponent<UICore>();
        GameState = new GameStateHandler();
        GameState.Initialize();

        PlayerInfo = new PlayerInfo();	
    }
Ejemplo n.º 2
0
		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();
		}
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        // 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();
        }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
    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();
    }
Ejemplo n.º 7
0
    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();
    }
Ejemplo n.º 8
0
 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());
         }
     }
 }
Ejemplo n.º 9
0
 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!");
         }
     }
 }
Ejemplo n.º 10
0
    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));
     }
 }
Ejemplo n.º 18
0
    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);
    }
Ejemplo n.º 19
0
    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));
        }
    }
Ejemplo n.º 21
0
        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);
        }
Ejemplo n.º 22
0
 public void InitJavascriptObject(UICore core)
 {
     this.Core = core;
 }
Ejemplo n.º 23
0
		public void MapCounter(UICore.Counter counter)
		{
		}
Ejemplo n.º 24
0
 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);
 }
Ejemplo n.º 25
0
 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);
 }
Ejemplo n.º 26
0
		public void MapFunction(UICore.FunctionInfo funcInfo)
		{
		}
Ejemplo n.º 27
0
		public void MapClass(UICore.ClassInfo classInfo)
		{
		}
Ejemplo n.º 28
0
		public void ParseSample(UICore.Messages.Sample sample)
		{
		}
Ejemplo n.º 29
0
 public void OnDisable()
 {
     _script     = null;
     _gameObject = null;
 }
Ejemplo n.º 30
0
 // Use this for initialization
 void Awake()
 {
     _instance = this;
     Load();
 }