Exemple #1
0
    protected override void Awake()
    {
        if (!Application.isPlaying)
        {
            return;
        }

        Singleton = this;
        base.Awake();
    }
Exemple #2
0
 public GlobalUIReceiver(UIInputModule module)
 {
     // We never unsubscribe these events--Always ensure only one GlobalUIReciever is associated with one UIInputModule
     module.pointerEnter            += OnPointerEnter;
     module.pointerExit             += OnPointerExit;
     module.pointerDown             += OnPointerDown;
     module.pointerUp               += OnPointerUp;
     module.pointerClick            += OnPointerClick;
     module.initializePotentialDrag += OnInitializePotentialDrag;
     module.beginDrag               += OnBeginDrag;
     module.drag           += OnDrag;
     module.endDrag        += OnEndDrag;
     module.drop           += OnDrop;
     module.scroll         += OnScroll;
     module.updateSelected += OnUpdateSelected;
     module.move           += OnMove;
     module.submit         += OnSubmit;
     module.cancel         += OnCancel;
 }