Example #1
0
        public RepositoryPage OpenReadme()
        {
            Waiter.UntilElementIsClickable(By.LinkText("README.md"), 10);
            Clicker.Click(By.LinkText("README.md"));

            return(this);
        }
Example #2
0
        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);
            }
        }
Example #3
0
    void HolyCleaveClick()
    {
        Clicker clicker = FindObjectOfType <Clicker>();

        BoardGenerator.Cell cell = m_moveControl.currentCell;
        clicker.setupClickBoard(cell, stats.getAttackRange, Clicker.TargetType.Enemy, true, HolyCleave);
    }
Example #4
0
    // 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.");
    }
Example #5
0
 private void Finish()
 {
     Data.IsSmokeActivated = false;
     Data.ShowResults();
     Clicker.SetActive(true);
     IsReadyToStart = true;
 }
Example #6
0
 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);
 }
Example #8
0
    void HealClick()
    {
        Clicker clicker = FindObjectOfType <Clicker>();

        BoardGenerator.Cell cell = m_moveControl.currentCell;
        clicker.setupClickBoard(cell, stats.getAttackRange, Clicker.TargetType.Ally, false, Heal);
    }
Example #9
0
        public void NewPullRequest()
        {
            string newPullRequestXPath = "//div[@class='repository-content ']/div/div/a";

            Waiter.UntilElementIsClickable(By.XPath(newPullRequestXPath), 10);
            Clicker.Click(By.XPath(newPullRequestXPath));
        }
Example #10
0
    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();
            }
Example #12
0
    public IEnumerator IEnumPressBtn(Vector2 vec)    //Нажатие кнопки Закинуть
    {
        Clicker.SetGlobalCursorPos(vec);
        yield return(new WaitForSeconds(0.1f));

        Clicker.SimulateOneClick(vec);
    }
Example #13
0
 public void Ready()
 {
     InitHeight();
     IsReadyToStart = true;
     Hud.SetActive(true);
     Clicker.SetActive(true);
 }
Example #14
0
        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();
            }
        }
Example #15
0
        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;
 }
Example #17
0
    void MoveClick()
    {
        Clicker clicker = FindObjectOfType <Clicker>();

        BoardGenerator.Cell cell = m_moveControl.currentCell;
        clicker.setupClickBoard(cell, stats.getMoveSpeed, Clicker.TargetType.Empty, true, Move);
    }
Example #18
0
        public RepositoryPage CreatePullRequest()
        {
            string CreatePullRequestButtonXPath = "//div[@class='form-actions']/button";

            Waiter.UntilElementIsClickable(By.XPath(CreatePullRequestButtonXPath), 10);
            Clicker.Click(By.XPath(CreatePullRequestButtonXPath));
            return(this);
        }
Example #19
0
    public void ShowMousePos()     //координаты курсора
    {
        vecMouse = Clicker.GetGlobalCursorPos();
        var x = vecMouse.x;
        var y = vecMouse.y;

        mousePositionTxt.text = "x = " + x + " ;" + "y = " + y + " ;";
    }
Example #20
0
 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";
     }
 }
Example #21
0
 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.";
     }
 }
Example #22
0
 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);
 }
Example #23
0
        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);
        }
Example #24
0
 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());
 }
Example #25
0
 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
 }
Example #26
0
 // 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;
 }
Example #27
0
 // 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);
 }
Example #30
0
 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);
 }
Example #31
0
 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();
     }
 }
Example #32
0
    void Awake()
    {
        if(_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
            _instance = this;

        DontDestroyOnLoad(this.gameObject);
    }
Example #33
0
    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);
    }
Example #34
0
 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);
 }
Example #35
0
 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);
                }
            }
        }