示例#1
0
 public void OnCollideWithBlob(BlobController other)
 {
     if (picked)
     {
         return;
     }
     other.ParentObject(gameObject);
     parent = other;
     picked = true;
 }
示例#2
0
    public void OnCollideWithBlob(BlobController other)
    {
        if (picked)
        {
            return;
        }
        other.ParentObject(gameObject);
        var rigidBody = GetComponent <Rigidbody2D>();

        if (rigidBody)
        {
            Destroy(rigidBody);
        }
        parent = other;
        picked = true;
    }
示例#3
0
    public void OnCollideWithBlob(BlobController other)
    {
        if (picked)
        {
            return;
        }
        other.ParentObject(gameObject);
        var rigidBody = GetComponent <Rigidbody2D>();

        if (rigidBody)
        {
            Destroy(rigidBody);
        }
        var collision = GetComponent <BoxCollider2D>();

        if (collision != null)
        {
            Destroy(collision);
        }

        other.GetComponent <Rigidbody2D>().sharedMaterial = legFriction;
        parent = other;
        picked = true;
    }