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

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

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