private void OnTriggerEnter2D(Collider2D info) { if ((DateTime.Now - _lastEncounter).TotalSeconds < _timeDelay / 2) { return; } _lastEncounter = DateTime.Now; _player = info.GetComponent <Player_controller>(); if (_player != null) { _player.TakeTamage(_damage); if (_poisonEffect) { _player.Poison(_poisonDamage); } } }