protected virtual void CheckTarget(RaycastHit rch, ref bool hit) { Transform c = rch.transform; CombinerEnemy h = c.GetComponent <CombinerEnemy>(); while (h == null && c.parent != null) { c = c.parent; h = c.GetComponent <CombinerEnemy>(); } if (h != target) { hit = false; } }
protected void ChargeOnHit(HittableObject target, Bullet bullet, RaycastHit rch, ref bool pierce) { CombinerEnemy c = target as CombinerEnemy; c.charges++; }