Exemplo n.º 1
0
    public void Release()
    {
        hook.showDropSite(false);

        Transform dropPoint = hook.dropPoint;

        hook.empty         = false;
        transform.parent   = null;
        transform.position = dropPoint.position;
        CheckLightActive checkScript = GetComponentInChildren <CheckLightActive>();

        if (checkScript != null)
        {
            audioManager.Play((int)AudioManager.SoundGeneral.LIGHT_CLICK);
            checkScript.Activate();
        }
        else
        {
            mLight.enabled = true;
        }
        Rotable rot = gameObject.GetComponent <Rotable>();

        if (rot != null)
        {
            rot.released();
        }
    }