Exemplo n.º 1
0
    public void EnableItem()
    {
        isSelected = true;
        LanternGO.SetActive(true);
        gameManager.ShowLightPercentagle(oilPercentage);
        anim.Play(IdleAnim);

        if (useHingeJoint && !hingeDataSet)
        {
            defaultHinge = new HingeData()
            {
                Position = hingeLantern.transform.localPosition,
                Rotation = hingeLantern.transform.localEulerAngles
            };

            hingeDataSet = true;
        }
    }
Exemplo n.º 2
0
    IEnumerator SelectCoroutine()
    {
        if (useHingeJoint && !hingeDataSet)
        {
            defaultHinge = new HingeData()
            {
                Position = hingeLantern.transform.localPosition,
                Rotation = hingeLantern.transform.localEulerAngles
            };

            hingeDataSet = true;
        }

        while (LanternLight.intensity <= oldIntensity)
        {
            LanternLight.intensity += Time.deltaTime * hideIntensitySpeed;
            FlameTint.a            += Time.deltaTime * hideIntensitySpeed;
            yield return(null);
        }

        FlameTint.a            = oldIntensity;
        LanternLight.intensity = oldIntensity;
        isSelected             = true;
    }