示例#1
0
 // Use this for initialization
 void Start()
 {
     internetPlugin = InternetPlugin.GetInstance();
     internetPlugin.SetDebug(0);
     internetPlugin.setInternetCallbackListener(OnWifiConnect, OnWifiDisconnect, OnWifiSignalStrengthChange);
     internetPlugin.RegisterEvent();
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     internetPlugin = InternetPlugin.GetInstance();
     internetPlugin.SetDebug(0);
     internetPlugin.Init();
     internetPlugin.setInternetCallbackListener(OnWifiConnect, OnWifiDisconnect, OnWifiSignalStrengthChange);
     UpdateStatus("Waiting...");
 }
示例#3
0
    // Use this for initialization
    void Start()
    {
        dispatcher = Dispatcher.GetInstance();

        internetPlugin = InternetPlugin.GetInstance();
        internetPlugin.SetDebug(0);
        internetPlugin.Init();
        internetPlugin.setInternetCallbackListener(OnWifiConnect, OnWifiDisconnect, OnWifiSignalStrengthChange);
        //internetPlugin.RegisterEvent();

        GetWifiSpeed();
    }
示例#4
0
    public static InternetPlugin GetInstance()
    {
        if(instance==null){
            container = new GameObject();
            container.name="InternetPlugin";
            instance = container.AddComponent( typeof(InternetPlugin) ) as InternetPlugin;
            DontDestroyOnLoad(instance.gameObject);
            aupHolder = AUPHolder.GetInstance();
            instance.gameObject.transform.SetParent(aupHolder.gameObject.transform);
        }

        return instance;
    }
示例#5
0
    public void Awake()
    {
        // Singleton
        _instance = this;
        DontDestroyOnLoad(gameObject);
        // Wifi tracker
        _internetPlugin = InternetPlugin.GetInstance();
        _internetPlugin.setInternetCallbackListener(OnWifiConnect, OnWifiDisconnect, OnWifiSignalStrengthChange);
        _internetPlugin.RegisterEvent();
        // FSM
        _fsm = StateMachine <States> .Initialize(this);

        _fsm.ChangeState(States.Away);
    }
示例#6
0
    public static InternetPlugin GetInstance()
    {
        if (instance == null)
        {
            container      = new GameObject();
            container.name = "InternetPlugin";
            instance       = container.AddComponent(typeof(InternetPlugin)) as InternetPlugin;
            DontDestroyOnLoad(instance.gameObject);
            aupHolder = AUPHolder.GetInstance();
            instance.gameObject.transform.SetParent(aupHolder.gameObject.transform);
        }

        return(instance);
    }
示例#7
0
    // Use this for initialization
    void Start()
    {
        //Debug.Log(batteryLevel);
        //Debug.Log(batteryStatus);

        batteryLevel = SystemInfo.batteryLevel;

        dispatcher = Dispatcher.GetInstance();

        internetPlugin = InternetPlugin.GetInstance();
        internetPlugin.SetDebug(0);
        internetPlugin.Init();
        internetPlugin.setInternetCallbackListener(OnWifiConnect, OnWifiDisconnect, OnWifiSignalStrengthChange);



        Debug.Log(NetworkReachability.NotReachable);
    }
示例#8
0
 // Use this for initialization
 void Start()
 {
     internetPlugin = InternetPlugin.GetInstance();
     internetPlugin.SetDebug(0);
     internetPlugin.setInternetCallbackListener(OnWifiConnect,OnWifiDisconnect,OnWifiSignalStrengthChange);
     internetPlugin.RegisterEvent();
 }
示例#9
0
 public void Awake()
 {
     _internetPlugin = InternetPlugin.GetInstance();
     _internetPlugin.setInternetCallbackListener(OnWifiConnect, OnWifiDisconnect, OnWifiSignalStrengthChange);
     _internetPlugin.RegisterEvent();
 }