private void button1_Click(object sender, EventArgs e) { Dead_Form de = new Dead_Form(); Portal port = new Portal(); timer1.Enabled = false; if (A_on.Checked == false) { port.timer1.Enabled = false; if (Hero.hp <= 20 && Hero.money == 0) { timer1.Enabled = false; timer2.Enabled = false; this.Hide(); de.ShowDialog(); } } port.ShowDialog(); }
private void timer1_Tick(object sender, EventArgs e) { Dead_Form df = new Dead_Form(); if (A_on.Checked == true) { if (Hero.hp <= 20 && Hero.money == 0) { timer1.Enabled = false; timer2.Enabled = false; this.Hide(); df.ShowDialog(); } if (Hero.hp <= 20) { HPBuy_Click(sender, e); } Hero.WhatUP(); if (Hero.GetSkill() == 0) { button1_Click(sender, e); } } }