private void HitCheck() { for (int index1 = 0; index1 < this.attacks.Count; ++index1) { AttackBase attack1 = this.attacks[index1]; if (attack1.hitting && (!this.blackOut || attack1.blackOutObject) && !attack1.effectMode) { foreach (Player player in this.players) { if (attack1.union != player.union && (!player.nohit && player.printplayer && (!player.invincibility || attack1.breakinvi) && attack1.HitCheck(player.position))) { attack1.HitEvent(player); } } foreach (EnemyBase enemy in this.enemys) { if (!enemy.nohit && (!enemy.invincibility || attack1.breakinvi)) { if (attack1.HitCheck(enemy.position, enemy.union)) { attack1.HitEvent(enemy); } if (attack1.rehit && attack1.HitCheck(enemy.positionre, enemy.union)) { attack1.HitEvent(enemy); } } } if (attack1.parry) { List <BustorShot> bustorShotList = new List <BustorShot>(); foreach (AttackBase attack2 in this.attacks) { if (attack2.hitting && (!object.Equals(attack1, attack2) && attack1.HitCheck(attack2.position) && attack1.HitCheck(attack2.position, attack2.union))) { this.sound.PlaySE(SoundEffect.damagezero); this.effects.Add(new Guard(this.sound, this, attack2.position.X, attack2.position.Y, 2)); BustorShot bustorShot = new BustorShot(this.sound, this, attack2.position.X, attack2.position.Y, attack1.union, attack1.power, BustorShot.SHOT.reflect, attack1.Element, true, 0) { canCounter = false, breaking = false, invincibility = attack1.invincibility, invincibilitytime = attack1.invincibilitytime, invincibilitytimeA = attack1.invincibilitytimeA, }; bustorShotList.Add(bustorShot); attack2.flag = false; } } foreach (AttackBase attackBase in bustorShotList) { this.attacks.Add(attackBase); } } for (int index2 = 0; index2 < this.objects.Count; ++index2) { if (!this.objects[index2].nohit && (this.objects[index2].unionhit || this.objects[index2].union != attack1.union) && (attack1.HitCheck(this.objects[index2].position) && !this.objects[index2].nohit)) { attack1.HitEvent(this.objects[index2]); } } } if (attack1.panelChange && !attack1.flag) { attack1.PanelChange(); } } }