Exemple #1
0
    public void connectTo(Vector3 pos)
    {
        if (state == JackHookState.Holding)
        {
            return;
        }
        clearPhysic();

        transform.position = pos;
        state = JackHookState.Connecting;
    }
Exemple #2
0
    void Start()
    {
        audioSource              = GetComponent <AudioSource> ();
        audioSource.loop         = false;
        audioSource.volume       = volume;
        audioSource.spatialBlend = 1.0f;

        state = JackHookState.Open;

        rig = gameObject.GetComponent <Rigidbody> ();

        if (rig == null)
        {
            rig             = gameObject.AddComponent <Rigidbody> ();
            rig.useGravity  = true;
            rig.isKinematic = false;
        }
    }
Exemple #3
0
 public void SetState(JackHookState s)
 {
     state = s;
 }