Exemplo n.º 1
0
    private void Update()
    {
        if (isHitLongPressButton)
        {
            gaugeTime += Time.deltaTime * 0.01f;
            buttonGauge.rectTransform.localPosition = Vector3.Lerp(buttonGauge.rectTransform.localPosition, new Vector3(0, 0, 1), gaugeTime);
        }
        else
        {
            gaugeTime = 0;
            buttonGauge.rectTransform.localPosition = firstButtonGaugePosition;
        }

        if (buttonGauge.rectTransform.localPosition.x > endPositionX)
        {
            UI.SetActive(false);
            _stageController.ChageStage();
        }
    }