コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        sliderDP.value = t_mgr.GetDP();
        sliderPP.value = t_mgr.GetPP();

        if (sliderDP.value.Equals(0))
        {
            imageHP.enabled = true;
        }
        else
        {
            imageHP.enabled = false;
        }


        if (iPrePp < sliderPP.value)
        {
            bHighlight = true;
            switch ((int)sliderPP.value)
            {
            case 100:
                fRotHighlight = 0;
                break;

            case 75:
                fRotHighlight = 45;
                break;

            case 50:
                fRotHighlight = 90;
                break;

            case 25:
                fRotHighlight = 135;
                break;

            default:
                bHighlight = false;
                break;
            }
            trHighlight.rotation = Quaternion.Euler(transform.eulerAngles.x, transform.eulerAngles.y, IMAGEBACK.transform.eulerAngles.z + fRotHighlight);
            if (bHighlight)
            {
                imageHighlight.color = Color.white;
                fTimer = 0;
            }
        }
        fTimer += Time.deltaTime;
        if (fTimer >= 1)
        {
            imageHighlight.color = Color.clear;
        }

        iPrePp = (int)sliderPP.value;
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     sliderAP.value = t_mgr.GetAP();
     sliderEP.value = t_mgr.GetEP();
     sliderPP.value = t_mgr.GetPP();
     sliderDP.value = t_mgr.GetDP();
     Ap();
     Ep();
     Hp();
     Pp();
 }