Beispiel #1
0
        public void Open(Action p_callback)
        {
            CoroutineAnchoredPosition translation = new CoroutineAnchoredPosition(
                transform: GetComponent <RectTransform>(),
                from: new Vector2(0, _closedYPosition),
                to: new Vector2(0, _openYPosition));

            StartCoroutine(translation.GetIEnumerator());
        }
        private void Start()
        {
            area.onPointerDown.AddListener(BeginTouch);
            area.onDrag.AddListener(ContinueTouch);
            area.onPointerUp.AddListener(EndTouch);

            _ptranslation = new CoroutineAnchoredPosition(_transform, Vector2.zero, Vector2.zero).SetDuration(.15f);

            _inputSleep = false;
        }