Пример #1
0
        private void OnEvent(object sender, EventD @event)
        {
            var args    = @event.Arguments;
            var message = args.Message;

            Debug.Log($"{nameof(ListenerD)} on {gameObject.name} received {@event} from {sender}: Message={message}");
        }
Пример #2
0
        public void Tick()
        {
            _ticks++;

            if (_ticks % 10 == 0)
            {
                var args   = new EventD.Args(_ticks.ToString());
                var @event = new EventD(args);
                _eventBus.Emit(this, @event);
            }
        }