Skip to content

TakeBall Action #3

@Bryan-Legend

Description

@Bryan-Legend

My kids tried to make a quiddich game. Here's a quick action that I coded up for it.

using UnityEngine;
using System.Collections;

public class TakeBall : Action {

    public override bool ExecuteAction(GameObject other)
    {
        other.transform.SetParent(transform);
        other.GetComponent<Rigidbody2D>().isKinematic = true;

        return base.ExecuteAction(other);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions