コード例 #1
0
    void Rotate(float duration)
    {
        float to = _rotateStep * GameConstants.HEXA_STEP_ANGLE;

        _numberText.LeanCancel();
        _numberText.LeanValue(_angle, to, duration).
        setEaseInOutBack().
        setOnUpdate(angle => {
            _angle = angle;
            _numberText.transform.localRotation =
                Quaternion.Euler(0.0f, 0.0f, angle);
        });
    }