protected override void OnTriggerEnter(Collider collider) { Enemy enemy = _GetValidEnemy(collider); if (!object.ReferenceEquals(enemy, null)) { if (targetCollection.ContainsKey(enemy.id)) { targetCollection[enemy.id].Enter(collider.get_name()); } else { TargetInfo targetInfo = new TargetInfo(); targetInfo.Enter(collider.get_name()); targetCollection.Add(enemy.id, targetInfo); } } }