Beispiel #1
0
        private void Awake()
        {
            wheel   = GetComponent <Graphic>();
            wheelTR = wheel.rectTransform;

            SimpleInputDragListener eventReceiver = gameObject.AddComponent <SimpleInputDragListener>();

            eventReceiver.Listener = this;
        }
Beispiel #2
0
        void Awake()
        {
            rectTransform = (RectTransform)transform;
            background    = GetComponent <Graphic>();
            if (background != null)
            {
                background.raycastTarget = true;
            }

            SimpleInputDragListener eventReceiver = gameObject.AddComponent <SimpleInputDragListener>();

            eventReceiver.Listener = this;
        }