示例#1
0
        //──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        /// <summary>
        /// Initialize the Selector for the first time
        /// </summary>
        public virtual void ResetController()
        {
            StopAllCoroutines();
            AnimateSelectionC = IAnimateSelection();                            //Store the courutine SelectionAnimation

            IndexSelected = FocusedItemIndex;                                   //Set the Index and current Item to the Focused Item
            CheckFirstItemFocus();
            InitialTransform.RestoreLocalTransform(transform);

            CurrentEventData = new PointerEventData(EventSystem.current);       //Store the Current Event Data
        }
示例#2
0
        //──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
        /// <summary>
        /// Initialize the Selector for the first time
        /// </summary>
        public virtual void ResetController()
        {
            StopAllCoroutines();
            AnimateSelectionC = IAnimateSelection();                            //Store the courutine SelectionAnimation

            IndexSelected = FocusedItemIndex;                                   //Set the Index and current Item to the Focused Item
            CheckFirstItemFocus();
            InitialTransform.RestoreLocalTransform(transform);

            CurrentEventData = new PointerEventData(EventSystem.current);       //Store the Current Event Data

            foreach (var item in Items)
            {
                if (item)
                {
                    item.IsRestoring = false;                                   //Restore all the Items to its original Location
                }
            }
        }
示例#3
0
        void Awake()
        {
            if (S_Editor && S_Manager)
            {
            }                                                                   //Store the Selector Editor
            S_Editor.enabled = false;                                           //Disable Circle EditorScript
            UILayer          = LayerMask.GetMask("UI");
            InitialTransform.StoreTransform(transform);                         //Store the initial transform of the selector;
            if (S_Camera)
            {
                InitialPosCam = S_Camera.transform.localPosition;               //Store the Camera Initial Local Position
            }
            CurrentEventData = new PointerEventData(EventSystem.current);       //Store the Current Event Data

            if (S_Manager.Data)
            {
                FocusedItemIndex = S_Manager.Data.Save.FocusedItem;             //UPDATE THE DATA WITH THE FOCUSED ITEM
            }
            LastDrag = DragSpeed;                                               //StoretheDragValue

            ResetController();
        }