private void Kill()
        {
            AntEffectEngine.GetEffect("eff_Explosion", transform.position);

            // Killing of the tank unit.
            if (EventDestroyed != null)
            {
                EventDestroyed(this);
            }

            _effect.StopAll();
            GameObject.Destroy(gameObject);
        }
        private void OnCollisionEnter2D(Collision2D aCollision)
        {
            if (aCollision.collider != null)
            {
                var tank = aCollision.collider.GetComponent <TankControl>();
                if (tank != null)
                {
                    // If has collision with other tank, apply damage to it.
                    tank.Health -= damage;
                }
            }

            // Make hit effect.
            AntEffectEngine.GetEffect("eff_TankHit", transform.position);

            // Kill the bullet.
            Kill();
        }
 /// <summary>
 /// Call this function when item is collected.
 /// </summary>
 public void Collect()
 {
     AntEffectEngine.GetEffect("eff_Collect", transform.position);
     EventCollected?.Invoke(this);
     GameObject.Destroy(gameObject);
 }