Commit b7c37095 authored by shujianhe's avatar shujianhe

1

parent a4fce68d
......@@ -62,7 +62,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
onEvent("tipShowPosMaxScale", onTipShowPosMaxScaleEvent);
onEvent("gamePlayerEndHandler", onGamePlayerEndHandlerEvent);
onEvent("closeGameScene", onCloseGameSceneEvent);
transform.Find("ingameLoad").gameObject.SetActive(false);
transform.Find("ingameLoad/loadImg").gameObject.SetActive(false);
//gameScenUser
var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
gridViewList.gameObject.SetActive(false);
......@@ -271,7 +271,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
private void handlerLoadingPosition(Image image)
{
transform.Find("ingameLoad").gameObject.SetActive(true);
Debug.Log("handlerLoadingPosition hand endl");
transform.Find("ingameLoad/loadImg").gameObject.SetActive(true);
utilsTools.setGDataByKey("downGaoQingBack", utilsTools.getTotalMillisecond());
float width = image.sprite.texture.width;
float height = image.sprite.texture.height;
......@@ -328,6 +329,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
void onZipFileHandler(GameScenUserInfo gameScenUser)
{
Debug.Log("handlerLoadingPosition hand begin");
string zpath = utilsTools.getWritableByPath("debugFiles/outzips/" + gameScenUser.id + ".zip");
if (utilsTools.IsPhone == false)
zpath = zpath.Replace("/", "\\");
......@@ -340,7 +342,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
utilsTools.setGDataByKey("beginUnZip", utilsTools.getTotalMillisecond());
ZipUtility.UnzipFile(zpath, outPath, "tuse" + gameScenUser.id);
utilsTools.setGDataByKey("endUnZip", utilsTools.getTotalMillisecond());
transform.Find("ingameLoad").gameObject.SetActive(true);
utilsTools.setGDataByKey("nowSelectUseData", gameScenUser);
Image image = transform.Find("ingameLoad/loadImg").GetComponent<Image>();
......@@ -401,8 +402,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{
if (isOk)
{
utilsTools.addTimer_Update(gameObject, "unZipNext", (String _) =>
{
utilsTools.addTimer_Update(gameObject, "unZipNext", (String _) =>{
utilsTools.setGDataByKey("downZipEnd", utilsTools.getTotalMillisecond());
onZipFileHandler(gameScenUser);
return false;
......
......@@ -21,26 +21,25 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
onEvent("showAreaEventOk", onSelectAreaEvent);
onEvent("showAreaPalyerEnd", onShowAreaPalyerEndEvent);
onEvent("inGameLoadingBarEnd", onInGameLoadingBarEndEvent);
//utilsTools.addTimer_Update(gameObject,"first", (string name) =>
//{
utilsTools.addTimer_Update(gameObject, "first", (string name) =>
{
if (utilsTools.ContainsKeyGDataByKey("NativeGameData") == false)
{
loadTest();
}
else
{
netLableImageItem jsonData = utilsTools.getGDataByKey<netLableImageItem>("NativeGameData",null);
if(jsonData == null)
netLableImageItem jsonData = utilsTools.getGDataByKey<netLableImageItem>("NativeGameData", null);
if (jsonData == null)
{
Debug.LogError("no valid data");
//return false;
return false;
}
utilsTools.setGameScenUserInfo(jsonData.id, jsonData.getLineUrl(), jsonData.getColorUrl(), jsonData.getJsonUrl(), jsonData.file);
//string id = utilsTools.getGDataByKey<String>("nowUseGameId", "");
startId(jsonData.id);
}
//return false;
//},3);
return false;
}, 2);
}
......
......@@ -38,8 +38,15 @@ public class utilsTools
}
}
public static string getGameSceneName()
{
if (Boolean.Parse(getGDataByKey<string>("showBackPlayer", "false")) == false)
{
return "Scenes/gameScene";
}
else
return "Scenes/gameScen?";
}
public static bool removeGDataByKey(string key)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment