Exemple #1
0
    void UpdateWillpower()
    {
        var willNumber = willpower.GetWillpower();

        willpowerImage.sprite = willpowerImages[willpower.GetWillpowerState()];
        willpowerNumber.text  = willNumber.ToString();
        if (willNumber <= 0)
        {
            willpowerNumber.color = Colors.toggleGrayColor;
        }
        else
        {
            willpowerNumber.color = Colors.completeColor;
        }
    }
Exemple #2
0
    public void ChooseLightMode()
    {
        regOuterRadius    = unchangedOuterRadius;
        regInnerRadius    = unchangedInnerRadius;
        regLightIntensity = unchangedIntensity;

        int willState = will.GetWillpowerState();

        regOuterRadius -= willState * 0.5f;
        if (willState > 1)
        {
            flickerOn          = true;
            regLightIntensity -= willState * 0.1f;
            blackChanceNumber -= willState * 5;
        }
        else
        {
            flickerOn = false;
        }
        plLight.pointLightOuterRadius = regOuterRadius;
        plLight.pointLightInnerRadius = regOuterRadius / innerOuterOffset;
        plLight.intensity             = regLightIntensity;
    }