예제 #1
0
 public void UIContextDidChange(string context)
 {
     Controller.BeginWrite();
     Controller.WriteScript("--wait UI load " + context);
     Controller.WriteScript("coroutine.yield(WaitUILoad(\"" + context + "\"));" + Environment.NewLine);
     Controller.EndWriting();
 }
예제 #2
0
        private InputWriter CreateTouchWriter(IEventSystemHandler handler)
        {
            if (currentInputWriter != null)
            {
                DestroyWriter();
            }

            if (recordExecuteEvent.SkipSendTouch)
            {
                return(null);
            }

            var selectable = handler as Selectable;

            if (selectable != null && !selectable.interactable)
            {
                return(null);
            }

            var selectGameObject = (handler as Component).gameObject;

            if (selectGameObject.tag == "SkipRecord")
            {
                return(null);
            }

            Controller.WriteDelay();
            var isDrag = handler is ScrollRect;
            var currentDragSessionName = (isDrag ? "Drag_" : "Click_") + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + selectGameObject.name + ".txt";
            var currentDragSessionPath = Path.Combine(PathFileTarget, currentDragSessionName);

            Controller.WriteScript((isDrag ? "--drag " : "--click ") + selectGameObject.name);
            Controller.WriteScript("coroutine.yield(MouseInput(\"" + selectGameObject.name + "\", \"" + currentDragSessionName + "\"));" + Environment.NewLine);

            currentInputWriter = new TouchWriter();

            currentInputWriter.StartWriter(selectGameObject, currentDragSessionPath);
            Controller.BeginWrite();

            return(currentInputWriter);
        }