本文整理匯總了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);
}
}
}