Ejemplo n.º 1
0
    public int CallMethod(int nMethodID, int nParam1, int nParam2, int nParam3, int nParam4, int nParam5)
    {
        int result = 0;

        if (GameJoySDK.mQMiObj == null)
        {
            GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
        }
        if (GameJoySDK.mQMiObj != null)
        {
            result = GameJoySDK.mQMiObj.CallStatic <int>("callMethod", new object[]
            {
                nMethodID,
                nParam1,
                nParam2,
                nParam3,
                nParam4,
                nParam5
            });
        }
        else
        {
            GameJoySDK.Log("CallMethod mQMiObj = null");
        }
        return(result);
    }
Ejemplo n.º 2
0
 public void StartQMi(float x, float y)
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         }
         if (GameJoySDK.playerActivityContext != null)
         {
             string text = "Unity3D_" + Application.unityVersion;
             GameJoySDK.mQMiObj.CallStatic("showQMi", new object[]
             {
                 GameJoySDK.playerActivityContext,
                 text,
                 x,
                 y
             });
         }
     }
 }
Ejemplo n.º 3
0
 public static void CheckSDKFeature()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.Log("checkSDKFeature recordplugin get context fail");
             return;
         }
         GameJoySDK.CheckSDKFeatureCallback checkSDKFeatureCallback = new GameJoySDK.CheckSDKFeatureCallback();
         GameJoySDK.mQMiObj.CallStatic("checkSDKFeature", new object[]
         {
             GameJoySDK.playerActivityContext,
             checkSDKFeatureCallback
         });
     }
     else
     {
         GameJoySDK.Log("checkSDKFeature get mQMiObj fail");
     }
 }
Ejemplo n.º 4
0
 public static bool checkFloatWindowPermission()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         }
         if (GameJoySDK.playerActivityContext != null)
         {
             return(GameJoySDK.mQMiObj.CallStatic <bool>("checkFloatWindowPermission", new object[]
             {
                 GameJoySDK.playerActivityContext
             }));
         }
     }
     else
     {
         GameJoySDK.Log("checkFloatWindowPermission get mQMiObj fail");
     }
     return(false);
 }
Ejemplo n.º 5
0
 public static void CheckSupportRecord()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.Log("isSupportRecord recordplugin get context fail");
             return;
         }
         GameJoySDK.RecordEnableCallback recordEnableCallback = new GameJoySDK.RecordEnableCallback();
         GameJoySDK.mQMiObj.CallStatic("isSupportRecord", new object[]
         {
             GameJoySDK.playerActivityContext,
             recordEnableCallback
         });
     }
     else
     {
         GameJoySDK.Log("isSupportRecord get mQMiObj fail");
     }
 }
Ejemplo n.º 6
0
 public bool IsRecording()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     return(GameJoySDK.mQMiObj != null && GameJoySDK.mQMiObj.CallStatic <bool>("isRecording", new object[0]));
 }
Ejemplo n.º 7
0
 public void closeVideoListDialog()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("closeVideoListDialog", new object[0]);
     }
 }
Ejemplo n.º 8
0
 public void endMomentRecording()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("endMomentRecording", new object[0]);
     }
 }
Ejemplo n.º 9
0
 public void showUploadShareDialog()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("showUploadShareVideoDialog", new object[0]);
         GameJoySDK.Log("GameRecorder showUploadShareDialog end call ");
     }
 }
Ejemplo n.º 10
0
 public static long getSystemCurrentTimeMillis()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         return(GameJoySDK.mQMiObj.CallStatic <long>("getSystemCurrentTimeMillis", new object[0]));
     }
     return(0L);
 }
Ejemplo n.º 11
0
 public string getCurRecorderPosition()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         return(GameJoySDK.mQMiObj.CallStatic <string>("getCurRecorderPosition", new object[0]));
     }
     GameJoySDK.Log("getCurRecorderPosition get mQMiObj fail");
     return(null);
 }
Ejemplo n.º 12
0
 public bool isRecordingMoments()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         return(GameJoySDK.mQMiObj.CallStatic <bool>("isRecordingMoment", new object[0]));
     }
     GameJoySDK.Log("IsRecordingMoment get mQMiObj fail");
     return(false);
 }
Ejemplo n.º 13
0
 public bool IsShowed()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         return(GameJoySDK.mQMiObj.CallStatic <bool>("isShowed", new object[0]));
     }
     GameJoySDK.Log("GameRecorder IsShowed get mQMiObj fail");
     return(false);
 }
Ejemplo n.º 14
0
 public void setVideoQuality(int flag)
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("setVideoQuality", new object[]
         {
             flag
         });
     }
 }
Ejemplo n.º 15
0
 public void lockRecorderPosition()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("lockRecorderPosition", new object[0]);
     }
     else
     {
         GameJoySDK.Log("lockRecorderPosition get mQMiObj fail");
     }
 }
Ejemplo n.º 16
0
 public void setCurRecorderPosition(float x, float y)
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("setCurRecorderPosition", new object[]
         {
             x,
             y
         });
     }
 }
Ejemplo n.º 17
0
 public void setUploadShareDialogDefaultPosition(float x, float y)
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("setUploadShareDialogPosition", new object[]
         {
             x,
             y
         });
     }
 }
Ejemplo n.º 18
0
 private void Awake()
 {
     GameJoySDK.Log("GameRecorder Awake: SDK Version:2015-09-22-0002-Camera-Render");
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.Log("GameRecorder: Java class not accessible from C#.");
     }
     else
     {
         this.InitializeRenderCamera("Pre");
     }
 }
Ejemplo n.º 19
0
 public void StopRecord()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("onStopRecordVideo", new object[0]);
         GameJoySDK.mRecorderStatus = GameJoySDK.RECORER_STATUS.RS_STOPED;
     }
     else
     {
         GameJoySDK.Log("StopRecord mQMiObj = null");
     }
 }
Ejemplo n.º 20
0
 public void StartRecord()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.mQMiObj.CallStatic("onStartRecordVideo", new object[0]);
         int num = GameJoySDK.mQMiObj.CallStatic <int>("getSRPpluginVersionCode", new object[0]);
         GameJoySDK.mSDKVersion     = num;
         GameJoySDK.mRecorderStatus = GameJoySDK.RECORER_STATUS.RS_STARTED;
     }
     else
     {
         GameJoySDK.Log("StartRecord mQMiObj = null");
     }
 }
Ejemplo n.º 21
0
 public void GetGameEngineType()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         string text = "Unity3D_" + Application.unityVersion;
         GameJoySDK.mQMiObj.CallStatic("setGameEngineType", new object[]
         {
             text
         });
     }
     else
     {
         GameJoySDK.Log("GetGameEngineType mQMiObj = null");
     }
 }
Ejemplo n.º 22
0
 public void initQMi()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.Log("startqmi get context failed");
             return;
         }
     }
     else
     {
         GameJoySDK.Log("GameRecorder StartQMi mqmiobj = null");
     }
 }
Ejemplo n.º 23
0
 public void showVideoListDialog()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         }
         if (GameJoySDK.playerActivityContext != null)
         {
             GameJoySDK.mQMiObj.CallStatic("showVideoListDialog", new object[]
             {
                 GameJoySDK.playerActivityContext
             });
         }
     }
 }
Ejemplo n.º 24
0
    public int EndDraw()
    {
        if (GameJoySDK.mRecorderStatus != GameJoySDK.RECORER_STATUS.RS_STARTED)
        {
            return(0);
        }
        int result = 0;

        if (GameJoySDK.mQMiObj == null)
        {
            GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
        }
        if (GameJoySDK.mQMiObj != null)
        {
            result = GameJoySDK.mQMiObj.CallStatic <int>("endDraw", new object[0]);
        }
        else
        {
            GameJoySDK.Log("EndDraw mQMiObj = null");
        }
        return(result);
    }
Ejemplo n.º 25
0
 public void startMomentRecording()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         }
         if (GameJoySDK.playerActivityContext != null)
         {
             string text = "Unity3D_" + Application.unityVersion;
             GameJoySDK.mQMiObj.CallStatic("startMomentRecording", new object[]
             {
                 GameJoySDK.playerActivityContext,
                 text
             });
         }
     }
 }
Ejemplo n.º 26
0
 public void InitRecordPlugin()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.Log("init recordplugin get context fail");
             return;
         }
         GameJoySDK.mQMiObj.CallStatic("initQMi", new object[]
         {
             GameJoySDK.playerActivityContext
         });
     }
     else
     {
         GameJoySDK.Log("InitRecordPlugin get mQMiObj fail");
     }
 }
Ejemplo n.º 27
0
 public void HideQMi()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.Log("hide qmi get context fail");
             return;
         }
         GameJoySDK.mQMiObj.CallStatic("hideQMi", new object[]
         {
             GameJoySDK.playerActivityContext
         });
     }
     else
     {
         GameJoySDK.Log("HideQMi get mQMiObj fail");
     }
 }
Ejemplo n.º 28
0
 public void ScollToSide()
 {
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         GameJoySDK.playerActivityContext = GameJoySDK.getActivityContext();
         if (GameJoySDK.playerActivityContext == null)
         {
             GameJoySDK.Log("ScollToSide get context fail");
             return;
         }
         GameJoySDK.mQMiObj.CallStatic("scollToSide", new object[]
         {
             GameJoySDK.playerActivityContext
         });
     }
     else
     {
         GameJoySDK.Log("ScollToSide get mQMiObj fail");
     }
 }
Ejemplo n.º 29
0
 public void generateMomentVideo(List <TimeStamp> timeStampList, string defaultGameTag, Dictionary <string, string> extraInfo)
 {
     if (timeStampList != null && timeStampList.get_Count() > 0)
     {
         this.showUploadShareDialog();
     }
     if (GameJoySDK.mQMiObj == null)
     {
         GameJoySDK.mQMiObj = GameJoySDK.mQMiObjJavaClass();
     }
     if (GameJoySDK.mQMiObj != null)
     {
         string        text          = null;
         StringBuilder stringBuilder = new StringBuilder();
         if (extraInfo != null)
         {
             using (Dictionary <string, string> .Enumerator enumerator = extraInfo.GetEnumerator())
             {
                 while (enumerator.MoveNext())
                 {
                     KeyValuePair <string, string> current = enumerator.get_Current();
                     string key   = current.get_Key();
                     string value = current.get_Value();
                     stringBuilder.Append(string.Format("{0}'{1}^", key, value));
                 }
             }
             text = stringBuilder.ToString();
             if (text != null)
             {
                 int num = text.LastIndexOf('^');
                 text = text.Substring(0, num);
             }
         }
         long[] array  = null;
         long[] array2 = null;
         if (timeStampList != null)
         {
             int count = timeStampList.get_Count();
             if (count != 0)
             {
                 TimeStamp[] array3 = timeStampList.ToArray();
                 array  = new long[count];
                 array2 = new long[count];
                 for (int i = 0; i < count; i++)
                 {
                     array[i]  = array3[i].startTime;
                     array2[i] = array3[i].endTime;
                 }
             }
         }
         GameJoySDK.mQMiObj.CallStatic("generateMomentVideo", new object[]
         {
             array,
             array2,
             defaultGameTag,
             text
         });
     }
     else
     {
         GameJoySDK.Log("OnApplicationFocus mQMiObj = null");
     }
 }