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

            return(this);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
    void HolyCleaveClick()
    {
        Clicker clicker = FindObjectOfType <Clicker>();

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

        BoardGenerator.Cell cell = m_moveControl.currentCell;
        clicker.setupClickBoard(cell, stats.getAttackRange, Clicker.TargetType.Ally, false, Heal);
    }
Ejemplo n.º 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));
        }
Ejemplo n.º 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();
        }
    }
Ejemplo n.º 11
0
            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();
            }
Ejemplo n.º 12
0
    public IEnumerator IEnumPressBtn(Vector2 vec)    //Нажатие кнопки Закинуть
    {
        Clicker.SetGlobalCursorPos(vec);
        yield return(new WaitForSeconds(0.1f));

        Clicker.SimulateOneClick(vec);
    }
Ejemplo n.º 13
0
 public void Ready()
 {
     InitHeight();
     IsReadyToStart = true;
     Hud.SetActive(true);
     Clicker.SetActive(true);
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 16
0
 // Start is called before the first frame update
 void Start()
 {
     player         = Player.instance;
     coinDrop       = CoinDrop.instance;
     clicker        = Clicker.instance;
     upgradeHandler = UpgradeHandler.instance;
 }
Ejemplo n.º 17
0
    void MoveClick()
    {
        Clicker clicker = FindObjectOfType <Clicker>();

        BoardGenerator.Cell cell = m_moveControl.currentCell;
        clicker.setupClickBoard(cell, stats.getMoveSpeed, Clicker.TargetType.Empty, true, Move);
    }
Ejemplo n.º 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);
        }
Ejemplo n.º 19
0
    public void ShowMousePos()     //координаты курсора
    {
        vecMouse = Clicker.GetGlobalCursorPos();
        var x = vecMouse.x;
        var y = vecMouse.y;

        mousePositionTxt.text = "x = " + x + " ;" + "y = " + y + " ;";
    }
Ejemplo n.º 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";
     }
 }
Ejemplo n.º 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.";
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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());
 }
Ejemplo n.º 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
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 28
0
        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);
        }
Ejemplo n.º 29
0
 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 32
0
    void Awake()
    {
        if(_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
            _instance = this;

        DontDestroyOnLoad(this.gameObject);
    }
Ejemplo n.º 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);
    }
Ejemplo n.º 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);
 }
Ejemplo n.º 35
0
 void Awake()
 {
     instance = this;
 }
Ejemplo n.º 36
0
        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);
                }
            }
        }