Exemplo n.º 1
0
    /// <summary>
    /// Returns null if settings selected bot is active
    /// </summary>
    /// <returns>Active readwriter</returns>
    public IRAMReadWriter GetCurrentlyActiveReadWriter()
    {
        InjectionProtocol currentIP = UI_Settings.GetInjectionProtocol();
        IRAMReadWriter    toRet     = null;

        switch (currentIP)
        {
        case InjectionProtocol.Sysbot:
            if (CurrentSysBot.Connected)
            {
                toRet = CurrentSysBot;
            }
            break;

        case InjectionProtocol.UsbBot:
#if UNITY_STANDALONE || UNITY_EDITOR
            if (CurrentUSBBot.Connected)
            {
                toRet = CurrentUSBBot;
            }
#elif PLATFORM_ANDROID
            if (CurrentUSBBotAndroid.Connected)
            {
                toRet = CurrentUSBBotAndroid;
            }
#endif
            break;
        }
        return(toRet);
    }
Exemplo n.º 2
0
    public void SetInjectionProtocol(InjectionProtocol injp)
    {
        CurrentInjP = injp;

        RootUSB.SetActive(false);
        RootSYS.SetActive(false);

        switch (CurrentInjP)
        {
        case InjectionProtocol.Sysbot:
            RootSYS.SetActive(true);
            break;

        case InjectionProtocol.UsbBot:
            RootUSB.SetActive(true);
            break;

        default:
            RootSYS.SetActive(true);
            break;
        }
    }
Exemplo n.º 3
0
 public static void SetInjectionProtocol(InjectionProtocol injp)
 {
     PlayerPrefs.SetInt(INJMODEKEY, (int)injp);
 }
Exemplo n.º 4
0
 public static InjectionProtocol GetInjectionProtocol(InjectionProtocol imDefault = InjectionProtocol.Sysbot)
 {
     return((InjectionProtocol)PlayerPrefs.GetInt(INJMODEKEY, (int)imDefault));
 }