Example #1
0
        public TriggerHandlerService()
        {
            NwTrigger?trigger = NwObject.FindObjectsWithTag <NwTrigger>("mytrigger").FirstOrDefault();

            if (trigger != null)
            {
                trigger.OnEnter += OnTriggerEnter;
            }
        }
Example #2
0
    public TriggerHandlerService(NativeEventService eventService)
    {
        NwTrigger trigger = NwObject.FindObjectsWithTag <NwTrigger>("mytrigger").FirstOrDefault();

        eventService.Subscribe <NwTrigger, TriggerEvents.OnEnter>(trigger, OnTriggerEnter);
    }