Esempio n. 1
0
    private void OnTriggerExit(Collider other)
    {
        if (other.CompareTag(Tags.ENEMY))
        {
            RangeEvent eventArgs = new RangeEvent(this, other.GetComponent <Enemy>(), RangeEvent.Type.Exit);

            _eventAggregator.Publish(eventArgs);
        }
    }
Esempio n. 2
0
        /// <summary>
        ///     Initiates the pulse, and triggers the event
        /// </summary>
        public void TakeMeasurement()
        {
            var distance = GetDistance();

            RangeEvent?.Invoke(this, new PingEventArgs(distance));
        }