public RepositoryPage OpenReadme() { Waiter.UntilElementIsClickable(By.LinkText("README.md"), 10); Clicker.Click(By.LinkText("README.md")); return(this); }
void OnMouseDown(MouseButtonDownEventArgs e) { if (currentBuilder == null) { if (ui.UIHovering) { return; } var raycast = input.CursorRaycast(); foreach (var result in raycast) { for (Node current = result.Node; current != Level.LevelNode && current != null; current = current.Parent) { if (!Level.TryGetBuilding(current, out IBuilding building)) { continue; } Clicker clicker = null; if ((clicker = building.GetDefaultComponent <Clicker>()) != null) { clicker.Click(e.Button, e.Buttons, e.Qualifiers); return; } } } } else { currentBuilder.OnMouseDown(e); } }
void HolyCleaveClick() { Clicker clicker = FindObjectOfType <Clicker>(); BoardGenerator.Cell cell = m_moveControl.currentCell; clicker.setupClickBoard(cell, stats.getAttackRange, Clicker.TargetType.Enemy, true, HolyCleave); }
// Creates Clicker script for the clicker technique selected. private void CreateClicker() { switch (clickerTechnique) { case ClickerTechnique.ClickerMouse: clicker = this.gameObject.AddComponent <ClickerMouse>(); return; case ClickerTechnique.ClickerDwellTime: clicker = this.gameObject.AddComponent <ClickerDwellTime>(); ((ClickerDwellTime)clicker).SetDwellTime(dwellTime); return; case ClickerTechnique.ClickerWink: clicker = this.gameObject.AddComponent <ClickerWink>(); return; case ClickerTechnique.ClickerBlink: break; case ClickerTechnique.ClickerSound: break; default: throw new System.Exception("No clicker technique specified."); } throw new System.Exception("Not implemented yet."); }
private void Finish() { Data.IsSmokeActivated = false; Data.ShowResults(); Clicker.SetActive(true); IsReadyToStart = true; }
void UpUse() { if (name == "start_up") { Clicker.score -= Constants.START_COST; } else if (name == "fst_emp_up") { TimeClicker.coinsPerSecond++; Clicker.employers++; Clicker.score -= Constants.FST_EMP_COST; } else if (name == "more_emp_up") { TimeClicker.coinsPerSecond += 8; Clicker.employers += 8; Clicker.score -= Constants.MORE_EMP_COST; } else if (name == "mobil_up") { TimeClicker.coinsPerSecond += 20; Clicker.employers += 20; Clicker.score -= Constants.MOBIL_COST; } else if (name == "garage_up") { Clicker.score -= Constants.GARAGE_COST; } Clicker.checkUpgrades(); }
public void BindTo(Folder folder, int iindex) { index = iindex; folderNameTextView.Text = folder.FolderName; checkBox.Checked = folder.Checked; ItemView.Click += (sender, e) => Clicker?.Invoke(index); }
void HealClick() { Clicker clicker = FindObjectOfType <Clicker>(); BoardGenerator.Cell cell = m_moveControl.currentCell; clicker.setupClickBoard(cell, stats.getAttackRange, Clicker.TargetType.Ally, false, Heal); }
public void NewPullRequest() { string newPullRequestXPath = "//div[@class='repository-content ']/div/div/a"; Waiter.UntilElementIsClickable(By.XPath(newPullRequestXPath), 10); Clicker.Click(By.XPath(newPullRequestXPath)); }
void UpdateUI() { curr_char = turnOrder.GetCurrent(); curCharacter = turnOrder.GetCurrent().GetComponent <Stats>(); if (!curCharacter) { Debug.LogError("Failed to get stats component from current head of turn from TurnOrder script"); } uiScript.SetupUI(curCharacter); SkillTreeScript skills = curCharacter.GetComponent <SkillTreeScript>(); skills.StartTurn(); curCharActions = skills.numActions + skills.numMoves; uiScript.SetupActions(skills); uiScript.SetTurnUI("Turn " + turnCounter); if (!clicker) { clicker = FindObjectOfType <Clicker>(); } clicker.CloseTiles(); if (curCharacter.tag == "Enemy") { curCharacter.gameObject.GetComponent <EnemyAIMaster>().NextTurn(); } }
public void Apply() { if (this.gameVsMachine.user_color == PlayerColor.White) { this.white_moves_picturebox = this.gameVsMachine.user_moves_picturebox; this.black_moves_picturebox = this.gameVsMachine.computer_moves_picturebox; this.white_stones_amount_label = this.gameVsMachine.user_stones_amount_label; this.black_stones_amount_label = this.gameVsMachine.computer_stones_amount_label; } else if (this.gameVsMachine.user_color == PlayerColor.Black) { this.white_moves_picturebox = this.gameVsMachine.computer_moves_picturebox; this.black_moves_picturebox = this.gameVsMachine.user_moves_picturebox; this.white_stones_amount_label = this.gameVsMachine.computer_stones_amount_label; this.black_stones_amount_label = this.gameVsMachine.user_stones_amount_label; } for (int x = 0; x < this.gameVsMachine.board.Width; x++) { for (int y = 0; y < this.gameVsMachine.board.Height; y++) { Clicker clicker = new Clicker(x, y, this); this.gameVsMachine.board.Squares[x, y].PictureBox.Click += clicker.React; } } black_stones_amount_label.Text = this.BlackAmount.ToString(); white_stones_amount_label.Text = this.WhiteAmount.ToString(); this.FirstTurn(); }
public IEnumerator IEnumPressBtn(Vector2 vec) //Нажатие кнопки Закинуть { Clicker.SetGlobalCursorPos(vec); yield return(new WaitForSeconds(0.1f)); Clicker.SimulateOneClick(vec); }
public void Ready() { InitHeight(); IsReadyToStart = true; Hud.SetActive(true); Clicker.SetActive(true); }
private void StartClicking(object sender, KeyPressEventArgs keyEventArguments) { if (keyEventArguments.KeyChar == 'p' && !IsClickingEnabled) { IColourPicker colourPicker = new ColourPicker(); IVideoDisplay display = new WindowsScreen(); IVideoDisplay currentWindow = WindowsApplication.GetForeground(); ICursor cursor = new WindowsCursor(); Color colour = colourPicker.GetFromDisplayPosition(display, cursor.GetPosition()); IPixelFinder pixelFinder = new PixelFinder(); IClicker clicker = new Clicker(); Thread clickingThread = new Thread(() => { IsClickingEnabled = true; while (IsClickingEnabled) { var clickedPosition = pixelFinder.FindPixelPosition(currentWindow, colour); if (clickedPosition.HasValue) { clicker.Click((int)currentWindow.Handle, clickedPosition.Value); } Thread.Sleep(TimeSpan.FromSeconds(1)); } }); clickingThread.Start(); } }
static void Main(string[] args) { var proxy = new Proxy { HttpProxy = "http://*****:*****@proxyfull.servizi.ras:80", SslProxy = "http://*****:*****@proxyfull.servizi.ras:80" }; var options = new ChromeOptions { Proxy = proxy }; using (IWebDriver driver = new ChromeDriver(options)) { //Notice navigation is slightly different than the Java version //This is because 'get' is a keyword in C# var ugrMain = new Clicker(driver); while (true) { ugrMain.Go().Search(); System.Threading.Thread.Sleep(1000); } } }
// Start is called before the first frame update void Start() { player = Player.instance; coinDrop = CoinDrop.instance; clicker = Clicker.instance; upgradeHandler = UpgradeHandler.instance; }
void MoveClick() { Clicker clicker = FindObjectOfType <Clicker>(); BoardGenerator.Cell cell = m_moveControl.currentCell; clicker.setupClickBoard(cell, stats.getMoveSpeed, Clicker.TargetType.Empty, true, Move); }
public RepositoryPage CreatePullRequest() { string CreatePullRequestButtonXPath = "//div[@class='form-actions']/button"; Waiter.UntilElementIsClickable(By.XPath(CreatePullRequestButtonXPath), 10); Clicker.Click(By.XPath(CreatePullRequestButtonXPath)); return(this); }
public void ShowMousePos() //координаты курсора { vecMouse = Clicker.GetGlobalCursorPos(); var x = vecMouse.x; var y = vecMouse.y; mousePositionTxt.text = "x = " + x + " ;" + "y = " + y + " ;"; }
private void BearingMadeInteractions(Clicker clicker) { if (clicker.name == "Bearing") { state = State.RaftDeflated; gameGUI.message = "Almost there. Now just fill up the raft with air and sail forward"; } }
private void StartInteractions(Clicker clicker) { if (clicker.gameObject == raft.gameObject) { state = State.RaftClicked; gameGUI.message = "It appears the raft has lost much of its air. There is a pump nearby. Maybe you can pump some air in."; } }
public RepositoryPage CommitToNewBranch() { Waiter.UntilElementIsPresent(By.XPath("//dd/div[2]/label/input"), 10); Clicker.Click(By.XPath("//dd/div[2]/label/input")); Waiter.UntilElementIsClickable(By.Id("submit-file"), 5); Clicker.Click(By.Id("submit-file")); return(this); }
public static void MoveOne(int num, int delay) { var pos = MouseOperations.GetCursorPosition(); SendKeys.Send(num.ToString()); SendKeys.Flush(); Clicker.LeftClick(pos.X, pos.Y, delay); }
public MainPage LogIn() { Waiter.UntilElementIsPresent(By.Id("login_field"), 10); TextBox.SendToTextboxById("login_field", userName); TextBox.SendToTextboxById("password", password); Clicker.Click(By.XPath("//*[@type='submit']")); Assert.IsTrue(driver.PageSource.Contains("GitHub")); return(new MainPage()); }
public void CreateSimpleRepository() { Waiter.UntilElementIsClickable(By.XPath(repoNametxtbxXpath), 10); TextBox.SendToTextBox(By.XPath(repoNametxtbxXpath), TestBase.repositoryName); Clicker.Click(By.Id("repository_auto_init")); Waiter.UntilElementIsClickable(By.XPath(createRepoButtonXpath), 10); Clicker.Click(By.XPath(createRepoButtonXpath)); Assert.IsTrue(driver.PageSource.Contains("README.md"));// assertion to change because it's not nice }
// Start is called before the first frame update void Start() { player = Player.instance; auto = Autoclicker.instance; clicker = Clicker.instance; options = Options.instance; multi = Multiplier.instance; upgradeHandler = UpgradeHandler.instance; }
// Start is called before the first frame update void Start() { player = Player.instance; clicker = Clicker.instance; multi = Multiplier.instance; platinum = DiamondUpgrades.instance; drop = CoinDrop.instance; upgradeHandler = UpgradeHandler.instance; tierHandler = TierHandler.instance; }
public IMouseClicker CreateClicker(ClickDelayEnum clickDelay, ClickAreaEnum clickArea, ClickTypeEnum clickType) { var clickerConfig = _clickerConfigFactory.CreateClickerConfig(clickArea); var clickerBehaviour = _clickBehaviourFactory.CreateClickBehaviour(clickType); var clickerInterval = _clickerIntervalFactory.CreateClickerInterval(clickDelay); var clicker = new Clicker(clickerInterval, clickerConfig, clickerBehaviour); return(clicker); }
public static void Move(int delay) { ShortcutManager.CtrlWith(Keys.N, delay); Thread.Sleep(delay); SendKeys.SendWait(4.ToString()); Thread.Sleep(delay); Clicker.LeftClick(Cursor.Position.X, Cursor.Position.Y, delay); Thread.Sleep(delay); Clicker.RightClick(delay); }
void Start() { plane=GameObject.Find("Plane"); astar=GameObject.Find("A*"); b=plane.GetComponent<Building>(); c=GetComponentInParent<Clicker>(); g=astar.GetComponent<Grid>(); tards = c.GetTarget(); target = tards.transform; PathRequestManager.RequestPath(transform.position, target.transform.position, OnPathFound); }
private void PumpClickedInteractions(Clicker clicker) { if (clicker.gameObject == raft.gameObject) { gameGUI.message = "A closer inspection reveals that the ball bearing assembly (that keeps the air from going out) " + "has been damaged. You will need to create one. Perhaps you can make use of the items available on " + "the table"; state = State.RaftChecked; bearingGame.Initialize(); } }
void Awake() { if(_instance != null && _instance != this) { Destroy(this.gameObject); return; } else _instance = this; DontDestroyOnLoad(this.gameObject); }
public void Start() { myTransform = transform; leaderTr = GameMaster.instance.selectedChar.gameObject.transform; navAgent = GetComponent<NavMeshAgent>(); leaderChanged(); myRadius = GetComponent<CapsuleCollider>().radius; myRadius *= myTransform.localScale.x; clicker = Clicker.instance; NPCs = GameObject.FindGameObjectsWithTag("NPC"); Messenger<bool>.AddListener("targetPosChanged", targetPosChanged); Messenger.AddListener("selectedCharChanged", leaderChanged); }
public static void Main() { _hookID = SetHook(_proc); Console.WriteLine("Enter the delay between each click in milliseconds (50 is pretty good): "); int delay = int.Parse(Console.ReadLine()); Console.WriteLine("Would you like right click? (y/n)"); String input = Console.ReadLine(); input = input.ToLower(); bool rightClick = input.Equals("y"); Console.WriteLine("Press the \"Insert\" key to start and stop the clicker"); Clicker clicks = new Clicker(delay, rightClick); Thread thread = new Thread(new ThreadStart(clicks.run)); thread.Start(); while (!thread.IsAlive) { Thread.Sleep(1); } Application.Run(); UnhookWindowsHookEx(_hookID); }
void Awake() { instance = this; }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (clickers == null) //first load { clickers = new FileLibrary<Clicker>("clickers"); clickers.LoadLibrary(); if (clickers.Count > 0) { clicker = clickers[0]; } else { clicker = new Clicker(5000, 50, 5, 6, false); } tbClickerStatus.DataContext = clicker; hotKeyManager = new HotKeyManager(this, new WindowInteropHelper(this).Handle); clicker.hotKeyIdStart = hotKeyManager.RegisterFKey(clicker.FKeyStart); clicker.hotKeyIdStop = hotKeyManager.RegisterFKey(clicker.FKeyStop); if (ApplicationDeployment.IsNetworkDeployed) { this.Title = this.Title + " " + ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(4); } } }