void OnTriggerEnter2D(Collider2D collider) { if (m_isBlinking) return; if (collider.IsEnemyShot ()) { GlobalVariables.EnemyWeaponPooling.SetObjectToPool(collider.GetComponent<MovementController>()); OnHit(); } else if (collider.IsObstacle()) { collider.GetComponent<Obstacle>().DoImpact(); OnHit(); } else if (collider.IsPowerUp()) { GlobalVariables.PowerUpPooling.SetObjectToPool(collider.transform); m_weaponController.Upgrade(); } }