コード例 #1
0
ファイル: FunctionHandling.cs プロジェクト: yhforever4/Kooboo
        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);
        }
コード例 #2
0
 public CustomFunction(CustomFunctionDelegate function)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public void OnUIHide(GameObject canvasToDisable, CustomFunctionDelegate customFunc = null)
 {
     canvasToDisable.SetActive(false);
     CanvasUnpaused?.Invoke();
     customFunc?.Invoke();
 }
コード例 #4
0
 public CustomFunction(CustomFunctionDelegate function)
 {
     Function = function;
 }
コード例 #5
0
 public void OnUIShow(GameObject canvasToEnable, CustomFunctionDelegate customFunc = null)
 {
     canvasToEnable.SetActive(true);
     CanvasPaused?.Invoke();
     customFunc?.Invoke();
 }