예제 #1
0
        public void Handle(object[] args)
        {
            if (_once && _calls > 0)
            {
                return;
            }
            _calls++;
            var methodParameterNumber = CallBack.GetMethodInfo().GetParameters().Length;

            CallBack?.DynamicInvoke(args.Take(methodParameterNumber).ToArray());
        }
        public static void GetLocationData(CallBack <LocationInfo> luaCallback, float waitTime)
        {
            if (Input.location.isEnabledByUser)
            {
                Log.Info("GPS not available");
            }

            Task task = new Task(ActivateGPS(waitTime), true);

            task.Finished += delegate(bool manual)
            {
                if (luaCallback != null)
                {
                    luaCallback.DynamicInvoke(m_LastLocationData);
                }
            };
        }