public void Connect(string mediatorClassRef, string mediatorName) { this.mediatorName = mediatorName; this.mediatorClassRef = mediatorClassRef; UnityFacade.GetInstance().ConnectMediator(this); }
public override void Execute(Like4LikeManager mgr) { Login(mgr); while (true) { ReNavigateEarnUrl(mgr); var oldWindow = mgr.Driver.WindowHandles.First(); if (mgr.Driver.Url == mgr.BonusUrl) { var bonus = UnityFacade.Resolve <BonusPage>(); bonus.OldPage = this; mgr.CurrentState = bonus; break; } mgr.Driver.SwitchTo().Window(oldWindow); var buttons = new ButtonGetter().Execute(mgr.Driver); foreach (var type in GetTypes()) { var arr = type.Split(new[] { "###" }, StringSplitOptions.RemoveEmptyEntries); ProcessLike(mgr, buttons.Buttons, arr[0], arr[1]); } mgr.Driver.SwitchTo().Window(oldWindow); //mgr.Driver.Navigate().Refresh(); } }
// Override Singleton Factory method public static UnityFacade GetInstance() { if (m_instance == null) { m_instance = new UnityFacade(); } return(m_instance as UnityFacade); }
// Use this for initialization void Awake() { Debug.Log("main方法操作没有"); //启动Facade操作 UnityFacade.GetInstance().StartUp(); //net启动 NetWork.init(); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { JobHandle job = new MovementJob { deltaTime = UnityFacade.getDeltaTime(), }.Schedule(this, inputDeps); return(job); }
static void Main() { UnityFacade.Reinit("unity"); var driver = UnityFacade.Resolve <DriverManager>(); driver.Init(); driver.CurrentState = UnityFacade.Resolve <LoginPage>(); while (true) { driver.Do(); } }
private void CheckForNavigate(Like4LikeManager mgr, IWebDriver driver) { if (driver.FindElements(By.XPath(ElementCheckLoginSuccessXPath)).Count > 0) { mgr.CurrentState = UnityFacade.Resolve <LogedInPage>(); } else if (driver.FindElements(By.XPath(ElementCheckFailedXPath)).Count > 0) { mgr.CurrentState = UnityFacade.Resolve <EnterCodePage>(); } else { Thread.Sleep(2000); throw new Exception("Unknown page"); } }
// Use this for initialization void Awake() { UnityFacade.GetInstance().StartUp(); }
static UnityFacade() { m_instance = new UnityFacade(); }
static UnityFacade() { Instance = new UnityFacade(); }
// Use this for initialization void Awake() { UnityFacade.GetInstance().StartUp(viewComponents, GetComponent <PhotonManager> ()); }
private static void ToFacebookLike(Like4LikeManager mgr) { mgr.CurrentState = UnityFacade.Resolve <LikeFacebookPage>();//new LikeFacebookPage(); }
private static void ToYoutubeLike(Like4LikeManager mgr) { mgr.CurrentState = UnityFacade.Resolve <LikeYoutubePage>();// new LikeYoutubePage(); }
public void Disconnect() { UnityFacade.GetInstance().DisconnectMediator(mediatorName); }
// public void Connect() { UnityFacade.GetInstance().ConnectMediator(this); }