private void Fight(Enemy enemy) { player.ResetMoveSpeed(); player.MoveBack(); frmBattle = FrmBattle.GetInstance(enemy); if (enemy == bossKoolaid) { frmBattle.SetupForBossBattle(); } frmBattle.Refresh(); frmBattle.ShowDialog(); //check if enemies are dead if (enemySmiley.Health <= 0 && picEnemySmiley.Visible == true) { Rectangle rect = new Rectangle(picEnemySmiley.Location, new Size(0, 0)); enemySmiley.Collider = new Collider(rect); picEnemySmiley.Visible = false; } else if (enemyCheeto.Health <= 0 && picEnemyCheeto.Visible == true) { picEnemyCheeto.Visible = false; } else if (enemyPoisonPacket.Health <= 0 && picEnemyPoisonPacket.Visible == true) { picEnemyPoisonPacket.Visible = false; } else if (bossKoolaid.Health <= 0 && picBossKoolAid.Visible == true) { picBossKoolAid.Visible = false; } }
private void Fight(Enemy enemy) { player.ResetMoveSpeed(); player.MoveBack(); frmBattle = FrmBattle.GetInstance(enemy); frmBattle.Show(); if (enemy == bossKoolaid) { frmBattle.SetupForBossBattle(); } }