Exemplo n.º 1
0
    public void Carry(Transform parent, Vector3 offset)
    {
        hook.empty = true;

        transform.SetParent(parent);
        transform.localPosition = offset;
        transform.rotation      = parent.transform.rotation;
        if (mLight != null)
        {
            CheckLightActive checkScript = GetComponentInChildren <CheckLightActive>();
            if (checkScript != null)
            {
                audioManager.Play((int)AudioManager.SoundGeneral.LIGHT_CLICK);
                checkScript.Deactivate();
            }
            else
            {
                mLight.enabled = false;
            }
        }
    }