void StopInspectingObject()
    {
        postProcessVolume.enabled = !postProcessVolume.enabled;

        grabbedObject.gameObject.layer = backgroundLayerNumber;  // Set layer Background
        // objectToInspect.settings.depthCompareFunction = CompareFunction.LessEqual;
        // objectToInspect.Create();
        // Debug.Log("Renderer setting changed! : " + objectToInspect.settings.depthCompareFunction.ToString());

        // Set Mask for blur background shader to Nothing and create the Object

        PlayerMovement.instance.canMove = true;
        rotateObject.canRotate          = false;
        Cursor.visible = false;
        mouse.EnableLook();
        objectName.enabled = true;
    }
Beispiel #2
0
    //public FMOD.Studio.EventInstance[] bgmS;

    void Awake()
    {
        sentOutOfGoopMessage = false;
        spawnPosition        = transform.position;
        type     = OldPlantType.Spread;
        mousePos = Input.mousePosition;
        Services.PlayerController = this;
        p_state          = GetComponent <PlayerState>();
        p_sc             = GetComponent <PlayerSc>();
        rb               = GetComponent <Rigidbody>();
        collider         = GetComponent <CapsuleCollider>();
        cam              = Camera.main;
        layerGround      = LayerMask.NameToLayer("Ground");
        Cursor.lockState = CursorLockMode.Locked;
        mouseLook        = cam.gameObject.GetComponent <MouseLook>();
        mouseLook.EnableLook();
        fadeOut.gameObject.SetActive(true);
    }