本文整理汇总了C#中BaseEvent.Init方法的典型用法代码示例。如果您正苦于以下问题:C# BaseEvent.Init方法的具体用法?C# BaseEvent.Init怎么用?C# BaseEvent.Init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseEvent
的用法示例。
在下文中一共展示了BaseEvent.Init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: webAPIProcess
IEnumerator webAPIProcess(WWW www, BaseEvent baseEvent, bool showLoading, bool isUpload)
{
if(www == null){
Debug.Log("www is null");
yield break;
}
if (www.error != null) {
Debug.Log("www.error : " +www.error.ToString());
}
float timeSum = 0f;
if(isUpload){
UtilMgr.ShowLoading(true, www);
yield return www;
} else{
if(showLoading)
UtilMgr.ShowLoading (showLoading);
while(!www.isDone &&
string.IsNullOrEmpty(www.error) &&
timeSum < TIMEOUT) {
timeSum += Time.deltaTime;
yield return 0;
}
}
//Debug.Log("www.text : " + www.url);
UtilMgr.DismissLoading ();
if(www.error == null && www.isDone)
{
Debug.Log(www.text);
mRetryCnt = 0;
// CommonDialogue.Show (www.text);
if(baseEvent != null){
Debug.Log("baseEvent != null");
baseEvent.Init(www.text);
}
}
else
{
Debug.Log(www.error);
mWWW = www;
mBaseEvent = baseEvent;
mIsUpload = isUpload;
mIsLoading = showLoading;
if(mRetryCnt < 10){
mRetryCnt++;
ConnectHandlerForHttp(DialogueMgr.BTNS.Btn1);
} else{
mRetryCnt = 0;
if (Application.loadedLevelName.Equals ("Login")) {
DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrNetworkError"),
UtilMgr.GetLocalText("StrNetworkError1"),
DialogueMgr.DIALOGUE_TYPE.YesNo,
UtilMgr.GetLocalText("StrRetry"), "",
UtilMgr.GetLocalText("StrExit"), ConnectHandlerForHttp);
} else
DialogueMgr.ShowDialogue(UtilMgr.GetLocalText("StrNetworkError"),
UtilMgr.GetLocalText("StrNetworkError1"),
DialogueMgr.DIALOGUE_TYPE.YesNo,
UtilMgr.GetLocalText("StrRetry"), "",
UtilMgr.GetLocalText("StrGotoTitle"), ConnectHandlerForHttp);
}
}
}
示例2: webAPIProcessInBackground
IEnumerator webAPIProcessInBackground(WWW www, BaseEvent baseEvent)
{
yield return www;
if (www.error != null) {
Debug.Log("www.error InBackground : " +www.error.ToString());
}
if(www.error == null && www.isDone)
{
Debug.Log(www.text);
if(baseEvent != null){
Debug.Log("baseEvent != null");
baseEvent.Init(www.text);
}
}
}