Esempio n. 1
0
        private void Update()
        {
            if (!StablePanel)
            {
                if (!_Dragging && _CurAlpha > 0 && Time.time - _FadeCount >= StayTime)
                {
                    _CurAlpha = _AlphaCount - (Time.time - _FadeCount - StayTime) / HideTime;

                    if (_CurAlpha <= 0)
                    {
                        _CurControlInfo.Axis = Vector3.zero;
                    }
                    _ImageMaterial.SetFloat("_GlobalAlpha", _CurAlpha);
                }
                else if (_Dragging && _CurAlpha < 1)
                {
                    _CurAlpha = _AlphaCount + (Time.time - _FadeCount) / ShowTime;
                    _ImageMaterial.SetFloat("_GlobalAlpha", _CurAlpha);
                }
            }

            ControlSys.InjectValue(CtrKey, _CurControlInfo);
            _CurControlInfo.Down        = false;
            _CurControlInfo.Up          = false;
            _CurControlInfo.Click       = false;
            _CurControlInfo.DoubleClick = false;
        }
Esempio n. 2
0
        private void Awake()
        {
            if (_Ins != null)
            {
                throw new InitDuplicatelyException();
            }
            _Ins = this;

#if UNITY_STANDALONE || UNITY_EDITOR
            if (_LockCursor)
            {
                _LockCursor = false;
            }
#endif
        }