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"); } }
// 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>(); }
private void SecondsToReset_Click(object sender, EventArgs e) { ResetTimer.Interval = (int)SecondsToReset.Value * 1000; TapButton.Focus(); }
private void ResetBPMButton_Click(object sender, EventArgs e) { ResetBPM(); TapButton.Focus(); }
// Use this for initialization void Start() { tapButton = GameObject.Find("TapButtonCode").GetComponent <TapButton> (); mainScript = mainScript.GetComponent <monsterHp>(); }