Example #1
0
        public override void StartReplay(ReplayController controller)
        {
            Controller = controller;

            //PathFileTarget = Path.Combine(controller.PathData(), ApiRecordComponent.);
            //Directory.CreateDirectory(PathFileTarget);

            Controller.RegistGlobal("RestoreFiles", (Action <string>)RestoreFiles);
        }
Example #2
0
        public override void StartReplay(ReplayController controller)
        {
            Controller = controller;

            //PathFileTarget = Path.Combine(controller.PathData(), ApiRecordComponent.);
            //Directory.CreateDirectory(PathFileTarget);

            //Controller.RegistGlobal("RestoreFiles", (Action<string>)RestoreFiles);
            Controller.RegistGlobal("CanClick", (Func <string, bool>)CanClick);
            Controller.RegistGlobal("GetText", (Func <string, string>)GetText);
            Controller.RegistGlobal("Assert", (Action <bool, string>)Assert);
        }
Example #3
0
//        private Dictionary<int, PointerEventData> m_PointerData;

        public override void StartReplay(ReplayController controller)
        {
            Controller = controller;

            var customInput = Object.FindObjectOfType <ReplayInput>();

            if (customInput == null)
            {
                customInput = gameObject.AddComponent <ReplayInput>();
                customInput.ReplayComponent = this;

                var inputModule = Object.FindObjectOfType <StandaloneInputModule>();
                var prop        = inputModule.GetType().GetField("m_InputOverride", System.Reflection.BindingFlags.NonPublic
                                                                 | System.Reflection.BindingFlags.Instance);
                prop.SetValue(inputModule, customInput);

                //prop = inputModule.GetType().GetField("m_PointerData", System.Reflection.BindingFlags.NonPublic
                //| System.Reflection.BindingFlags.Instance);
                //m_PointerData = prop.GetValue(inputModule) as Dictionary<int, PointerEventData>;
            }

            if (recordExecuteEvent == null)
            {
                recordExecuteEvent          = gameObject.AddComponent <RecordExecuteEvent>();
                recordExecuteEvent.OnEvent += ProcessEvent;
            }

            //customInput.ReplayComponent = this;

            PathFileTarget = Path.Combine(controller.PathData(), InputRecordComponent.FOLER_DATA);
            //Directory.CreateDirectory(PathFileTarget);

            //Controller.RegistGlobal("MouseClick", (Func<string, IEnumerator>)MouseClick);
            Controller.RegistGlobal("MouseInput", (Func <string, string, IEnumerator>)MouseInput);
            Controller.RegistGlobal("KeyboardInput", (Func <string, IEnumerator>)KeyboardInput);
            Controller.RegistGlobal("ClickObject", (Func <string, IEnumerator>)ClickObject);

            //Controller.RegistGlobal("CanClick", (Func<string, bool>)CanClick);
            Controller.RegistGlobal("KeyboardInputText", (Func <string, IEnumerator>)KeyboardInputText);
            Controller.RegistGlobal("InputTextField", (Func <string, string, IEnumerator>)InputTextField);
            //Controller.RegistGlobal("MouseDown", (Action<string>)MouseDown);
            //Controller.RegistGlobal("MouseUp", (Action)MouseUp);
        }
Example #4
0
 public abstract void StartReplay(ReplayController controller);
Example #5
0
 public override void StartReplay(ReplayController controller)
 {
     Controller = controller;
     Controller.RegistGlobal("WaitUILoad", (Func <string, IEnumerator>)WaitUILoad);
 }