Esempio n. 1
0
    void OnCollisionEnter2D(Collision2D other)
    {
        PuckSpeedLimiter puck = other.transform.GetComponentInParent <PuckSpeedLimiter>();

        if (puck != null)
        {
            SimplePool.Spawn(impactVFXPrefab, (Vector3)(other.contacts[0].point) + Vector3.back);
        }
    }
    protected void checkPuck(Collider2D other)
    {
        PuckSpeedLimiter puck = other.GetComponentInParent <PuckSpeedLimiter>();

        if (puck != null)
        {
            payload.DeliverToPuck(puck);
            Active = false;
        }
    }
 public override void DeliverToPuck(PuckSpeedLimiter target)
 {
     target.GetComponent <LastBumped>().setLastBumped(bullet.Source.transform.root);
     AttachToTarget(target.GetComponent <Rigidbody2D>(), puckDuration);
     otherInterrupt.enabled = true;
 }
 public abstract void DeliverToPuck(PuckSpeedLimiter target);
 public override void DeliverToPuck(PuckSpeedLimiter target)
 {
     target.GetComponent<LastBumped>().setLastBumped(bullet.Source.transform.root);
     AttachToTarget(target.GetComponent<Rigidbody2D>(), puckDuration);
     otherInterrupt.enabled = true;
 }
 public abstract void DeliverToPuck(PuckSpeedLimiter target);