예제 #1
0
    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;
        }
    }
예제 #2
0
    protected void ChargeOnHit(HittableObject target, Bullet bullet, RaycastHit rch, ref bool pierce)
    {
        CombinerEnemy c = target as CombinerEnemy;

        c.charges++;
    }