Пример #1
0
        protected override void OnStart()
        {
            var entity = Context.GetValue <IGameEntity>(ActionConsts.Unit);

            _listener = entity.Owner.GetComponentInChildren <TriggerListener>();
            _listener.TriggerEnter += OnTriggerEnter;
        }
Пример #2
0
 protected override void OnEnd()
 {
     _listener.TriggerEnter -= OnTriggerEnter;
     _listener = null;
 }