virtual protected void OnCollide(Collision collision)
    {
        if (collision.gameObject.CompareTag("Player"))
        {
            return;
        }

        // Kill enemy
        if ((!HasHitUnit) && (collision != null) && (collision.transform.gameObject.layer == LayerMask.NameToLayer("Enemy")))
        {
            EnemyUnitBaseScript enemyunit = collision.transform.GetComponent <EnemyUnitBaseScript>();
            if (enemyunit)
            {
                enemyunit.Die_Killed();
            }

            Destroy(collision.transform.gameObject);

            // Flag as hit so no other units are destroyed this frame
            HasHitUnit = true;

            // Virtual override for child classes
            OnUnitHit(collision);
        }

        // Kill protectile
        Destroy(transform.parent.gameObject);

        // Spawn projectile death effect
        GameObject effect = (GameObject)Instantiate(DeathEffectPrefab, transform.position, Quaternion.Euler(Vector3.zero));

        effect.transform.SetParent(GameObject.Find("GameObjectContainer").transform);
    }
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.layer == LayerMask.NameToLayer("Enemy"))
        {
            TakeHealth(1);

            // Kill enemy
            EnemyUnitBaseScript enemyunit = other.GetComponent <EnemyUnitBaseScript>();
            if (enemyunit)
            {
                enemyunit.Die_DamageGate();
                Destroy(other.gameObject);
            }

            // Check for game lose conditions
            if (Health <= 0)
            {
                GameLogic.CheckForGameEnd(true);
            }
        }
    }