Example #1
0
        private IntPtr SassFunctionCallback(IntPtr sassValues, IntPtr callback, IntPtr compiler)
        {
            ISassType[] convertedValues = TypeFactory.GetSassArguments(sassValues);

            IntPtr signaturePtr = sass_function_get_signature(callback);
            string signature    = PtrToString(signaturePtr);

            IntPtr cookiePtr = sass_function_get_cookie(callback);
            CustomFunctionDelegate customFunctionCallback = _functionsCallbackDictionary[cookiePtr];

            ISassType returnedValue = customFunctionCallback(_sassOptions, signature, convertedValues);

            var ptr = TypeFactory.GetRawPointer(returnedValue, ValidityEvent);

            ValidityEvent.Invoke();

            return(ptr);
        }
Example #2
0
 public CustomFunction(CustomFunctionDelegate function)
 {
     throw new NotImplementedException();
 }
Example #3
0
 public void OnUIHide(GameObject canvasToDisable, CustomFunctionDelegate customFunc = null)
 {
     canvasToDisable.SetActive(false);
     CanvasUnpaused?.Invoke();
     customFunc?.Invoke();
 }
Example #4
0
 public CustomFunction(CustomFunctionDelegate function)
 {
     Function = function;
 }
Example #5
0
 public void OnUIShow(GameObject canvasToEnable, CustomFunctionDelegate customFunc = null)
 {
     canvasToEnable.SetActive(true);
     CanvasPaused?.Invoke();
     customFunc?.Invoke();
 }