コード例 #1
0
ファイル: CKLBUITouchPad.cs プロジェクト: keizi/PlaygroundOSS
 public CKLBUITouchPad(CKLBTask parent, CallBack callback, bool modal = false)
     : base(s_classID)
 {
     NativeManagement.resetCppError();
     IntPtr ptr = CKLBUITouchPad_create(parent != null ? parent.CppObject : IntPtr.Zero, modal);
     NativeManagement.intercepCppError();
     bind(ptr);
     m_callback = callback;
 }
コード例 #2
0
ファイル: CKLBUIControl.cs プロジェクト: keizi/PlaygroundOSS
 public CKLBUIControl(CKLBTask parent, OnClickCallBack onClickCallBack, OnDragCallBack onDragCallBack)
     : base(s_classID) 
 {
     NativeManagement.resetCppError();
     IntPtr ptr = CKLBUIControl_create(parent != null ? parent.CppObject : IntPtr.Zero);
     NativeManagement.intercepCppError();
     bind(ptr);
     m_onDragCallBack = onDragCallBack;
     m_onClickCallBack = onClickCallBack;
 }
コード例 #3
0
 public CKLBAsyncLoader(CKLBTask pParent, String[] assets, uint datasetID, CallBack callback)
     : base(s_classID)
 {
     NativeManagement.resetCppError();
     IntPtr ptr = CKLBAsyncLoader_create((pParent != null) ? pParent.CppObject : IntPtr.Zero, 
                                          __MarshallingUtils.NativeUtf8ArrayFromStringArray(assets, assets.Length), (uint)assets.Length, datasetID);
     NativeManagement.intercepCppError();
     m_callback = callback;
     bind(ptr);
 }
コード例 #4
0
 public CKLBGenericTask(CKLBTask parent, CKLBTask.ETASK_PHASE phase, ExecuteCallBack executeCallBack, DieCallBack dieCallBack)
     : base(s_classID)
 {
     NativeManagement.resetCppError();
     IntPtr ptr = CKLBGenericTask_create(parent != null ? parent.CppObject : IntPtr.Zero, (uint)phase);
     NativeManagement.intercepCppError();
     bind(ptr);
     m_executeCallBack = executeCallBack;
     m_dieCallBack = dieCallBack;
 }
コード例 #5
0
        public CKLBIntervalTimer(CKLBTask parent, uint interval, CallBack callback, bool repeat = false, ETIMERMODE mode = ETIMERMODE.INTERVALTIMER_TIME) 
            : base(s_classID)
        {
            NativeManagement.resetCppError();
            IntPtr ptr = CKLBIntervalTimer_create(parent != null ? parent.CppObject : IntPtr.Zero, interval, repeat, (byte)mode);
            NativeManagement.intercepCppError();
            bind(ptr);

            m_callback = callback;
        }
コード例 #6
0
        public CKLBAsyncLoader(CKLBTask pParent, String[] assets, uint datasetID, CallBack callback)
            : base(s_classID)
        {
            NativeManagement.resetCppError();
            IntPtr ptr = CKLBAsyncLoader_create((pParent != null) ? pParent.CppObject : IntPtr.Zero,
                                                __MarshallingUtils.NativeUtf8ArrayFromStringArray(assets, assets.Length), (uint)assets.Length, datasetID);

            NativeManagement.intercepCppError();
            m_callback = callback;
            bind(ptr);
        }
コード例 #7
0
        public CKLBUITouchPad(CKLBTask parent, CallBack callback, bool modal = false)
            : base(s_classID)
        {
            NativeManagement.resetCppError();

            IntPtr ptr = CKLBUITouchPad_create(parent != null ? parent.CppObject : IntPtr.Zero, modal);

            NativeManagement.intercepCppError();
            bind(ptr);
            m_callback = callback;
        }
コード例 #8
0
        public CKLBGenericTask(CKLBTask parent, CKLBTask.ETASK_PHASE phase, ExecuteCallBack executeCallBack, DieCallBack dieCallBack)
            : base(s_classID)
        {
            NativeManagement.resetCppError();
            IntPtr ptr = CKLBGenericTask_create(parent != null ? parent.CppObject : IntPtr.Zero, (uint)phase);

            NativeManagement.intercepCppError();
            bind(ptr);
            m_executeCallBack = executeCallBack;
            m_dieCallBack     = dieCallBack;
        }
コード例 #9
0
        public CKLBIntervalTimer(CKLBTask parent, uint interval, CallBack callback, bool repeat = false, ETIMERMODE mode = ETIMERMODE.INTERVALTIMER_TIME)
            : base(s_classID)
        {
            NativeManagement.resetCppError();

            IntPtr ptr = CKLBIntervalTimer_create(parent != null ? parent.CppObject : IntPtr.Zero, interval, repeat, (byte)mode);

            NativeManagement.intercepCppError();
            bind(ptr);

            m_callback = callback;
        }
コード例 #10
0
        public CKLBUIControl(CKLBTask parent, OnClickCallBack onClickCallBack, OnDragCallBack onDragCallBack)
            : base(s_classID)
        {
            NativeManagement.resetCppError();

            IntPtr ptr = CKLBUIControl_create(parent != null ? parent.CppObject : IntPtr.Zero);

            NativeManagement.intercepCppError();
            bind(ptr);
            m_onDragCallBack  = onDragCallBack;
            m_onClickCallBack = onClickCallBack;
        }
コード例 #11
0
ファイル: CKLBNetAPI.cs プロジェクト: ForceRain/PlaygroundOSS
        public CKLBNetAPI(CKLBTask parent, String apiUrl, String clientVersion, String consumerKey, String applicationID, uint sessionMax = 1, String region = "840" /*America*/, CallBack callback = null, CallBackVersionUp versionUpCallback = null)
            : base(s_classID)
        {
            NativeManagement.resetCppError();
            IntPtr ptr = CKLBNetAPI_create( parent != null ? parent.CppObject : IntPtr.Zero,__MarshallingUtils.NativeUtf8FromString(apiUrl),__MarshallingUtils.NativeUtf8FromString(clientVersion),
                                            __MarshallingUtils.NativeUtf8FromString(consumerKey),__MarshallingUtils.NativeUtf8FromString(applicationID),sessionMax,__MarshallingUtils.NativeUtf8FromString(region));
            NativeManagement.intercepCppError();
            bind(ptr);

            m_callback          = callback;
            m_callbackVersionUp = versionUpCallback;
        }
コード例 #12
0
        public CKLBNetAPI(CKLBTask parent, String apiUrl, String clientVersion, String consumerKey, String applicationID, uint sessionMax = 1, String region = "840" /*America*/, CallBack callback = null, CallBackVersionUp versionUpCallback = null)
            : base(s_classID)
        {
            NativeManagement.resetCppError();

            IntPtr ptr = CKLBNetAPI_create(parent != null ? parent.CppObject : IntPtr.Zero, __MarshallingUtils.NativeUtf8FromString(apiUrl), __MarshallingUtils.NativeUtf8FromString(clientVersion),
                                           __MarshallingUtils.NativeUtf8FromString(consumerKey), __MarshallingUtils.NativeUtf8FromString(applicationID), sessionMax, __MarshallingUtils.NativeUtf8FromString(region));

            NativeManagement.intercepCppError();
            bind(ptr);

            m_callback          = callback;
            m_callbackVersionUp = versionUpCallback;
        }