Ejemplo n.º 1
0
        private EventBinding SubscribeApplicationQuitInstance(Action action)
        {
            EventBinding bind = _applicationQuitEvents.Subscribe(action);

            EventBindings.Add(bind);
            return(bind);
        }
Ejemplo n.º 2
0
 protected override void HexAwake()
 {
     ResolveDependencies();
     EventBindings.Add(PawnControl.OnPawnState.Subscribe(HandlePawnState));
     EventBindings.Add(PawnControl.OnPawnBehave.Subscribe(HandlePawnBehaviour));
     EventBindings.Add(HoverableProvider.OnHoverableEvent.Subscribe(HandleHoverableEvent));
     EventBindings.Add(PawnControl.OnInteractionState.Subscribe(HandleInteractionState));
 }
Ejemplo n.º 3
0
        /// <inheritdoc>
        protected override void HexAwake()
        {
            ResolveDependencies();
            EventBindings.ClearAndUnsubscribeAll();
            ResolveEventBindings(EventBindings);
#if HEXDB
            LogInfo <MonoDependent>($"Awake complete. Dependencies and EventBindings resolved");
#endif
        }
Ejemplo n.º 4
0
        protected override void HexAwake()
        {
            AMonoDataProvider[] providers = gameObject.GetComponents <AMonoDataProvider>();

            foreach (AMonoDataProvider p in providers)
            {
                EventBindings.Add(p.OnProvideData.Subscribe(HandleDataReceived));
            }
        }
 /// <inheritdoc />
 protected override void HexAwake()
 {
     base.HexAwake();
     ResolveDependencies();
     if (_pointerProvider != null)
     {
         EventBindings.Add(_pointerProvider.OnPointer.Subscribe(HandlePointerEvent));
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Slide the rect transform to hidden or to visable slide positions
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public void Slide(bool state)
        {
            IInterpolationToken <float[]> token = InterpolationManager.Instance.StartInterpolation(
                _interpolationId,
                _speed,
                new SInterpolation(
                    state ? _startAnchorX : _isLeft ? _startAnchorX - _distance : _startAnchorX + _distance,
                    state ? _isLeft ? _startAnchorX - _distance : _startAnchorX + _distance : _startAnchorX,
                    _ease
                    ));

            EventBindings.Add(token.OnInterpolationCanceledSubscriber.Subscribe(HandleEndOrCancel));
            EventBindings.Add(token.OnInterpolationEndSubscriber.Subscribe(HandleEndOrCancel));
            EventBindings.Add(token.OnInterpolationSubscriber.Subscribe(HandleInterpolation));
        }
Ejemplo n.º 7
0
 private void HandleEndOrCancel()
 {
     EventBindings.ClearAndUnsubscribeAll();
 }
Ejemplo n.º 8
0
 protected override void HexAwake()
 {
     ResolveDependencies();
     EventBindings.Add(PointerProivder.OnPointer.Subscribe(HandlePointerEvent));
 }
Ejemplo n.º 9
0
 private void OnEnable()
 {
     bindings = new EventBindings <Vector2IntEventListener, Vector2IntEvent>(target as Vector2IntEvent);
 }
Ejemplo n.º 10
0
 protected override void HexAwake()
 {
     EventBindings.Add(OnPointerEvent.Subscribe(HandlePointerEvent));
 }
Ejemplo n.º 11
0
 protected override void HexAwake()
 {
     EventBindings.Add(HoverableEvent.Subscribe(HandleHoverableEvent));
 }