private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "") { Launch?.Invoke(textBox1.Text); } }
private void _launchButton_Click(object sender, EventArgs e) { if (Launch != null) { Cursor = Cursors.WaitCursor; Launch.Invoke(_addin, null); Cursor = Cursors.Default; } }
private void LaunchBullet() { if (ammoCapacity == 0) { return; } ammoCapacity -= 1; var bulletActive = Instantiate(bullet, transform.position, transform.rotation); var rbBull = bulletActive.GetComponent <Rigidbody2D>(); rbBull.AddForce(transform.up * bulletForce, ForceMode2D.Impulse); shootSound.Play(); Launch?.Invoke(); }
protected void OnLaunch() { Launch?.Invoke(); }