Commit d7386eda authored by shujianhe's avatar shujianhe

1

parent 8685dd91
......@@ -29,6 +29,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
private int rvalue = -1;
public GameObject fpsObj = null;
private DateTime dtime;
private bool autoSwitchGroup = true;
private bool vibration = true;
Dictionary<string, EventChildItemBack> childEventHandlers = new Dictionary<string, EventChildItemBack>();
void onEvent(string name, EventChildItemBack func)
{
......@@ -60,6 +62,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
onEvent("tipShowPosMaxScale", onTipShowPosMaxScaleEvent);
onEvent("gamePlayerEndHandler", onGamePlayerEndHandlerEvent);
onEvent("closeGameScene", onCloseGameSceneEvent);
transform.Find("ingameLoad").gameObject.SetActive(false);
//gameScenUser
var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
gridViewList.gameObject.SetActive(false);
......@@ -268,6 +271,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
private void handlerLoadingPosition(Image image)
{
transform.Find("ingameLoad").gameObject.SetActive(true);
utilsTools.setGDataByKey("downGaoQingBack", utilsTools.getTotalMillisecond());
float width = image.sprite.texture.width;
float height = image.sprite.texture.height;
......@@ -315,6 +319,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
Sprite sprite = Sprite.Create(texture2d, new Rect(0, 0, texture2d.width, texture2d.height), new Vector2(0.5f, 0.5f));
image.sprite = sprite;
image.color = Color.white;
autoSwitchGroup = Boolean.Parse(utilsTools.getGDataByKey<string>("auto-switch", autoSwitchGroup.ToString()));
//vibration = Boolean.Parse(utilsTools.getGDataByKey<string>("vibration", autoSwitchGroup.ToString()))
gameShowView.GetComponent<mainGameView>().loadGameImgId();
this.handlerLoadingPosition(image);
}
......@@ -511,8 +517,14 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
this.onUpdateGroupGridHandler(gobject, idx, lvbType, groupInfos[idx]);
};
gridViewList.setDataNoGrid(groupInfos.Count, gradView);
//震动
if (nowidx >= 0)
{
if(autoSwitchGroup == false)
{
nowidx = -1;
return;
}
var maingameView = gameShowView.GetComponent<mainGameView>();
maingameView.switchShowAreaGroup((short)(groupInfos[nowidx].gid), (int id, bool isOk) => {
});
......
......@@ -21,8 +21,8 @@ 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();
......@@ -33,14 +33,14 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
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;
//},3);
}
......
......@@ -704,6 +704,7 @@ public class mainGameView : MonoBehaviour
if (false == gameUserInfo.createWorkDirectory())return false;
utilsTools.sendEventObjectParams("inGameLoadingValue", 3f, false);
fillAnimation = Boolean.Parse(utilsTools.getGDataByKey<String>("fillanimation", "false"));
this.gameScenUseInfo = gameUserInfo;
for (short i = 0; i < gameUserInfo.areaInfoUseData.Count; i++)
{
......
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