void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag != "Enemy") { return; } AIEnemy pEnemy = other.gameObject.GetComponent <AIEnemy>(); if (pEnemy == null) { return; } Tuple <int, bool> Damage = Rule.BulletDamage(pAI.iPlayer, FirstHit); int iDamage = Rule.UpgradeWeaponRevolver(Damage.Item1, iCountMax - iCount); pEnemy.AddHP(-iDamage, Damage.Item2); Statistics.pthis.RecordHit(ENUM_Damage.Revolver, Damage.Item1, FirstHit); if (FirstHit && Damage.Item2) { pEnemy.HitSfx("G_Crit"); } if (FirstHit == false) { pEnemy.HitSfx("G_Combo"); } History.Add(other.gameObject); if (iCount <= 0) { Destroy(gameObject); } GameObject NewTarget = GetTarget(); if (NewTarget == null) { Destroy(gameObject); } FirstHit = false; --iCount; pAI.Chace(NewTarget); }