示例#1
0
        public void TestBasic()
        {
            AddStep("create button", () =>
            {
                Child = tapButton = new TapButton
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Scale  = new Vector2(4),
                };
            });

            bool pressed = false;

            AddRepeatStep("Press button", () =>
            {
                InputManager.MoveMouseTo(tapButton);
                if (!pressed)
                {
                    InputManager.PressButton(MouseButton.Left);
                }
                else
                {
                    InputManager.ReleaseButton(MouseButton.Left);
                }

                pressed = !pressed;
            }, 100);
        }
 private void Awake()
 {
     button    = GetComponent <Button>();
     tapButton = GetComponent <TapButton>();
     if (button == null && tapButton == null)
     {
         Log.LogError(this, "ShowMembershipFlowButton requires a Button component or a TapButton component");
     }
 }
示例#3
0
    // Start is called before the first frame update
    void Awake()
    {
        FindAll();
        BtTup = GameObject.Find("left").GetComponent <TapButton>();

        HeroTransf   = GameObject.Find("gg").GetComponent <Transform>();
        AnimHero     = GameObject.Find("gg").GetComponent <Animator>();
        InvertImage  = GameObject.Find("invertar").GetComponent <Image>();
        CheckMassive = GameObject.Find("invertar").GetComponent <SaveMassive>();
    }
示例#4
0
 private void SecondsToReset_Click(object sender, EventArgs e)
 {
     ResetTimer.Interval = (int)SecondsToReset.Value * 1000;
     TapButton.Focus();
 }
示例#5
0
 private void ResetBPMButton_Click(object sender, EventArgs e)
 {
     ResetBPM();
     TapButton.Focus();
 }
示例#6
0
 // Use this for initialization
 void Start()
 {
     tapButton  = GameObject.Find("TapButtonCode").GetComponent <TapButton> ();
     mainScript = mainScript.GetComponent <monsterHp>();
 }