Example #1
0
    void OnTriggerEnter(Collider collision)
    {
        SourceNut nut = collision.gameObject.GetComponent <SourceNut>();

        if (nut)
        {
            ConsumeNut();
            nut.Consume();
        }
    }
Example #2
0
    void OnTriggerEnter(Collider collision)
    {
        if (IsUpgrading)
        {
            return;
        }

        SourceNut nut = collision.gameObject.GetComponent <SourceNut>();

        if (nut)
        {
            ConsumeNut();
            nut.Consume();
        }
    }