protected override void onClick(GameObject obj) { if ("cancelBtn" == obj.name) { //GameEventMgr.GetInstance().DispatchEvent("CloseUI", EventType.UIMsg, "UILogin"); } if (obj.name == "okBtn") { Debug.LogWarning("点击了OK按钮!"); uiHintTest.Open(); } if (obj.name == "bg") { Debug.LogWarning("点击了bg按钮"); } }
protected override void onClick(GameObject obj) { if ("cancelBtn" == obj.name) { //GameEventMgr.GetInstance().DispatchEvent("CloseUI", EventType.UIMsg, "UILogin"); } if (obj.name == "okBtn") { Debug.LogWarning("点击了OK按钮!"); uiHintTest.Open(); //TODO: 测试视频下载 var path = Path.Combine(CommonHelper.GetAssetPath(), "Videos.mp4"); //var testUrl = @"http://vjs.zencdn.net/v/oceans.mp4"; var testUrl = @"http://vjs.zencdn.net/v/oceans.mp4" + "?" + DateTime.Now; Debug.LogWarning("-------------->视频网络资源地址" + testUrl); DownloadMovHelper.Begin(path, testUrl, () => { Debug.LogWarning("开始下载。"); } , () => { Debug.LogWarning("下载完成。"); }, (reason) => { Debug.LogWarning("下载失败原因" + reason); }, (progress) => { Debug.LogWarning("下载进度" + progress); }); } if (obj.name == "bg") { Debug.LogWarning("点击了bg按钮"); } if (obj.name == "calcelBtn") { DownloadMovHelper.Stop(); } }