Commit b7c37095 authored by shujianhe's avatar shujianhe

1

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