Пример #1
0
    void Start()
    {
        httpNetwork = HttpNetManager.Instance;
        httpNetwork.requestURL = "http://dev-soul.shinezoneapp.com/?&*=[{0}]"; //请求地址
        httpNetwork.requestParams = "[\"{0}\",[{1}]]"; //参数组装
        httpNetwork.userID = "77"; //用户id
        httpNetwork.waitResponseTime = 3;
        httpNetwork.resetSendMax = 2;

        httpNetwork.RegisterResponse("game.login", ResponseHandler);  //单个接口的侦听
		httpNetwork.serverErrorResponse = ServerErrorHandler;
        httpNetwork.netTimeOut = NetTimeOutHandler;  //网络超时

		httpNetwork.Post("game.login", ResponseHandler);  //单一侦听,报了系统级别错误不会有回调
		httpNetwork.Post("game.login", ResponseHandler);
        httpNetwork.Post("game.reset", ResponseHandler);
        httpNetwork.Post("cityOrder.list", ResponseHandler);
        httpNetwork.Post("game.login", ResponseHandler);


        httpNetwork.PostOneToOne("game.login");
        httpNetwork.PostOneToOne("game.login", PostOneToOneHandler);
        httpNetwork.PostOneToOne("game.login", "Http://test.com/&*={0}");
        httpNetwork.PostOneToOne("game.login", "Http://test.com/&*={0}", PostOneToOneHandler);
    }
Пример #2
0
 void Awake()
 {
     _Instance = this;
     DontDestroyOnLoad(this.gameObject);
     Init();
 }
Пример #3
0
 void Awake()
 {
     _Instance = this;
     DontDestroyOnLoad(this.gameObject);
     Init();
 }