Commit 93c80321 authored by shujianhe's avatar shujianhe

1

parent f880f694
fileFormatVersion: 2
guid: cc17797b19aa99741839e64bc6dd1f4a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -291,10 +291,10 @@ RectTransform:
m_Father: {fileID: 744743282}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 154}
m_SizeDelta: {x: 730, y: 730}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &289270099
MonoBehaviour:
......@@ -350,6 +350,10 @@ PrefabInstance:
propertyPath: m_Name
value: remove
objectReference: {fileID: 0}
- target: {fileID: 4790972399934209839, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4796231568445269378, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_Sprite
value:
......@@ -392,11 +396,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalScale.x
value: 0.6
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalScale.y
value: 0.6
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalPosition.x
......@@ -428,11 +432,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_AnchoredPosition.x
value: 236
value: 179
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_AnchoredPosition.y
value: 996
value: 696
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -492,6 +496,10 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 1107985568}
m_Modifications:
- target: {fileID: 1583902233695634631, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_Color.a
value: 0.65882355
objectReference: {fileID: 0}
- target: {fileID: 1643446527150243925, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_text
value:
......@@ -500,6 +508,10 @@ PrefabInstance:
propertyPath: m_Name
value: close
objectReference: {fileID: 0}
- target: {fileID: 4790972399934209839, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4796231568445269378, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_Sprite
value:
......@@ -542,11 +554,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalScale.x
value: 0.6
value: 0.45
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalScale.y
value: 0.6
value: 0.45
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalPosition.x
......@@ -578,11 +590,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_AnchoredPosition.x
value: -421
value: -320
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_AnchoredPosition.y
value: 996
value: 696
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -685,7 +697,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 0.08018869, b: 0.08018869, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
......@@ -838,7 +850,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 930, y: 930}
m_SizeDelta: {x: 720, y: 720}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &630251541
MonoBehaviour:
......@@ -905,7 +917,7 @@ RectTransform:
m_GameObject: {fileID: 732833740}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.43, y: 1.43, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1107985568}
......@@ -914,7 +926,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 750, y: 1624}
m_SizeDelta: {x: 820, y: 1624}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &732833742
MonoBehaviour:
......@@ -993,7 +1005,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: -90, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &744743283
MonoBehaviour:
......@@ -1190,9 +1202,9 @@ RectTransform:
m_Children:
- {fileID: 487384859}
- {fileID: 732833741}
- {fileID: 374557556}
- {fileID: 744743282}
- {fileID: 334282930}
- {fileID: 374557556}
- {fileID: 1818278352}
m_Father: {fileID: 0}
m_RootOrder: 1
......@@ -1226,10 +1238,22 @@ PrefabInstance:
propertyPath: m_text
value:
objectReference: {fileID: 0}
- target: {fileID: 3386487943296901383, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_SizeDelta.x
value: 88
objectReference: {fileID: 0}
- target: {fileID: 3386487943296901383, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_SizeDelta.y
value: 102
objectReference: {fileID: 0}
- target: {fileID: 4790972399934209839, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_Name
value: clear
objectReference: {fileID: 0}
- target: {fileID: 4790972399934209839, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4796231568445269378, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_Sprite
value:
......@@ -1272,11 +1296,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalScale.x
value: 0.6
value: 0.45
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalScale.y
value: 0.6
value: 0.45
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalPosition.x
......@@ -1308,11 +1332,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_AnchoredPosition.x
value: 423
value: 323
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_AnchoredPosition.y
value: 996
value: 696
objectReference: {fileID: 0}
- target: {fileID: 6616910588763818716, guid: d22d30a8bc14c794682266b9e458c412, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
......@@ -1401,8 +1425,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 462}
m_SizeDelta: {x: 890, y: 150}
m_AnchoredPosition: {x: 0, y: 463}
m_SizeDelta: {x: 690, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1857210834
MonoBehaviour:
......@@ -1603,8 +1627,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 158}
m_SizeDelta: {x: 950, y: 940}
m_AnchoredPosition: {x: 0, y: 76}
m_SizeDelta: {x: 720, y: 720}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2108168560
MonoBehaviour:
......
......@@ -48,7 +48,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
dtime = DateTime.Now;
if (utilsTools.ContainsKeyGDataByKey("urlRoot") == false)
{
utilsTools.setGDataByKey("urlRoot", "http://192.168.124.124:19898");// "http://8.218.187.222:19897");
utilsTools.setGDataByKey("urlRoot", "http://8.218.187.222:19897");// "http://8.218.187.222:19897");
}
//Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None);
......@@ -333,7 +333,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
Texture2D texture2d = data as Texture2D;
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;
image.color = new Color(1,1,1,1);
autoSwitchGroup = Boolean.Parse(utilsTools.getGDataByKey<string>("auto_switch", autoSwitchGroup.ToString()));
if (autoSwitchGroup == false) nowidx = -1;
vibration = Boolean.Parse(utilsTools.getGDataByKey<string>("vibration", vibration.ToString()));
......@@ -563,14 +563,16 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
public void onCloseGameSceneEvent(List<UnityEngine.Object> uobjects, List<System.Object> objects)
{
Debug.Log("准备关闭");
utilsTools.sendEvent("CloseScenePrve");
utilsTools.addTimer_Update(gameObject, "close", (String name) =>
{
Debug.Log("关闭");
gameShowView.GetComponent<mainGameView>().onClear();
utilsTools.setGDataByKey("NativeTempData", "main");
SceneManager.LoadScene("Scenes/MainGame");
return false;
}, 20);
}, 35);
}
public void onTestTemp1()
......
......@@ -36,6 +36,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
Debug.LogError("no valid data");
return false;
}
utilsTools.setGDataByKey("imgId", jsonData.sid.ToString());
utilsTools.setGameScenUserInfo(jsonData.id, jsonData.getLineUrl(), jsonData.getColorUrl(), jsonData.getJsonUrl(), jsonData.file);
startId(jsonData.id,jsonData);
utilsTools.httpGET(this, "{0}/app/v1/game/ts/imgSchedule?zygt=hzwz&tgtk=1&imgId={1}&uid={2}", true, (string id, string url, bool isSuccess, System.Object data) =>
......@@ -51,7 +52,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
{
return 1;
}
},utilsTools.getGDataByKey<String>("urlRoot",""),jsonData.sid,utilsTools.getGDataByKey<String>("uid",""));
},utilsTools.getGDataByKey<String>("urlRoot",""),jsonData.sid,utilsTools.getGDataByKey<String>("uid","123456"));
}
return false;
}, 2);
......@@ -141,10 +142,14 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
}
void onCloseScenePrveHandler(List<UnityEngine.Object> uobject,List<System.Object> objects)
{
Debug.Log("onCloseScenePrveHandler 1");
if (gameScenUserInfo != null)
{
Debug.Log("onCloseScenePrveHandler 2");
utilsTools.saveGameScenUserInfo(gameScenUserInfo);
Debug.Log("onCloseScenePrveHandler 3");
updateProgress();
Debug.Log("onCloseScenePrveHandler 4");
gameScenUserInfo = null;//直接释放如果期间没有保存,就一起丢失
}
}
......@@ -153,8 +158,8 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
String urlRoot = utilsTools.getGDataByKey<String>("urlRoot", "");
String url = String.Format("{0}/app/v1/game/ts/saveImgSchedule?zygt=hzwz&tgtk=1", urlRoot);
Dictionary<String, System.Object> param1 = new Dictionary<string, System.Object>();
param1.Add("imgId", utilsTools.getGDataByKey<int>("imgId",-1).ToString());
param1.Add("uid", utilsTools.getGDataByKey<string>("uid","-1"));
param1.Add("imgId", utilsTools.getGDataByKey<string>("imgId","-1"));
param1.Add("uid", utilsTools.getGDataByKey<string>("uid","123456"));
float allAreaSize = (float)utilsTools.getGDataByKey<int>("allAreaSize", 0);
float jindu = gameScenUserInfo.areaInfoUseData.Count / allAreaSize;
param1.Add("schedule",jindu.ToString());
......@@ -162,7 +167,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
String jsonParam = "{";
foreach (var item in param1)
{
jsonParam = string.Format("{0}\"{1}\":{2},",jsonParam,item.Key,item.Value.ToString());
jsonParam = string.Format("{0}\"{1}\":\"{2}\",",jsonParam,item.Key,item.Value.ToString());
}
if (jsonParam.EndsWith(","))
{
......@@ -170,9 +175,17 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
}
jsonParam = jsonParam + "}";
onUrlBackHandler back = (string id, string url, bool isSuccess, System.Object data) =>{
if (isSuccess)
{
Debug.Log("onUpdateProgress " + data.ToString());
}
else
{
Debug.Log("error");
}
return 0;
};
Debug.Log("---------- " + url);
utilsTools.httpPOST(this, url, jsonParam, true,back);
}
......
......@@ -61,7 +61,7 @@ public class Native : MonoBehaviour
{
Debug.Log("JSON:" + json);
//json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}";
json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}";
utilsTools.setGDataByKey("NativeGameData", JsonUtility.FromJson<netLableImageItem>(json));
SceneManager.LoadScene(utilsTools.getGameSceneName());
......
......@@ -36,7 +36,7 @@ public class replayerBack : MonoBehaviour
}
public void onReset()
{
Debug.Log(VideoHelp.getDllVersion());
//Debug.Log(VideoHelp.getDllVersion());
}
public void onContinue()
{
......
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public class mainGameOneImageView : mainGameView
{
// Start is called before the first frame update
public GameObject oneImg = null;
private Dictionary<string, Color[]> allColor2 = new Dictionary<string, Color[]>();
private Dictionary<string, Vector2Short> allColorSize = new Dictionary<string, Vector2Short>();
void Start()
{
}
// Update is called once per frame
void Update()
{
baseUpdate();
}
public void onLineAndSelectBack()
{
if(allColor2.ContainsKey("outColor") == false)
{
utilsTools.addTimer_Update(gameObject, "waitOutColorInit", (String name) =>
{
if (allColor2.ContainsKey("outColor") == false) return true;
onLineAndSelectBack();
return false;
}, 4);
}
Vector2Short vector2Short = allColorSize["outColor"];
int width = vector2Short.x;
int height = vector2Short.y;
loopAddTaskBack(width, 300, (System.Object[] param) =>
{
int start = (int)param[0];
int step = (int)param[1];
float x = 1.0f;
float y = 1.0f;
int a1 = utilsTools.getTotalMillisecond();
Vector2Short vector2Short2 = allColorSize["final"];
utilsTools.sendEventObjectParams("inGameLoadingValue", 6f, false);
for (int y1 = 0; y1 < height; y1++)
{
y = y1;
for (int x1 = start; x1 < (start + step); x1++)
{
x = x1;
int index = y1 * width + x1;
short value = digitMatrix.Data[x1, y1];
if (value.Equals(bianlun)){
allColor2["outColor"][index] = allColor2["line"][index];
}
else if(value.Equals(fullShow))
{
int index2 = (int)(x / (float)width * vector2Short2.x + y / (float)height * vector2Short2.y);
allColor2["outColor"][index] = allColor2["final"][index];
}
}
}
});
}
public override void loadFileInfo(string url, string localpath, int typeId)
{
if (typeId == 1 || typeId == 2)
{
utilsTools.httpDOWNIMG(this, url, localpath, (string id, string url1, bool isSuccess, System.Object data) =>
{
if (isSuccess == false)
{
utilsTools.addTimer_Sec(gameObject, url1, (string name1) =>
{
loadFileInfo(url1, localpath, typeId);
return false;
}, 5);
return 0;
}
else
{
Texture2D texture2d = data as Texture2D;
if(typeId == 1)
{
allColor2.Add("line",texture2d.GetPixels());
allColorSize.Add("line", new Vector2Short((short)texture2d.width, (short)texture2d.height));
}
else if(typeId == 2)
{
allColor2.Add("final", texture2d.GetPixels());
allColorSize.Add("final", new Vector2Short((short)texture2d.width, (short)texture2d.height));
}
if(allColor2.ContainsKey("line") && allColor2.ContainsKey("select"))
{
onLineAndSelectBack();
}
return 1;
}
});
}
else if (typeId == 3)
{
utilsTools.httpDownText(this, url, localpath, (string id, string url1, bool isSuccess, System.Object data) =>
{
if (isSuccess == false)
{
utilsTools.addTimer_Sec(gameObject, url1, (string name1) =>
{
loadFileInfo(url1, localpath, typeId);
return false;
}, 5);
return 0;
}
else
{
utilsTools.setGDataByKey("downJsonBack", utilsTools.getTotalMillisecond());
utilsTools.sendEventObjectParams("inGameLoadingValue", 8f, false);
string jsondata = data as string;
gameIdJsonData gameidJsondata1 = JsonUtility.FromJson<gameIdJsonData>(jsondata);
int centerSize = gameidJsondata1.roomDatas.Count();
foreach (var item in aid2selectOrderIdx)
{
gameidJsondata1.roomDatas[item.Key].isShow = true;
}
for (int i = 0; i < gameidJsondata1.roomGroupsData.Count(); i++)
{
var group = gameidJsondata1.roomGroupsData[i];
group.isComplete = true;
for (int j = 0; j < group.roomIds.Count(); j++)
{
if (gameidJsondata1.roomDatas[group.roomIds[j]].isShow == false)
{
group.isComplete = false;
break;
}
}
}
utilsTools.sendEventObjectParams("inGameLoadingValue", 2f, false);
for (int i = 0; i < gameidJsondata1.roomGroupsData.Count; i++)
{
var group = gameidJsondata1.roomGroupsData[i];
for (int i1 = 0; i1 < group.roomIds.Count(); i1++)
{
gameidJsondata1.roomDatas[group.roomIds[i1]].gid = group.id;
}
}
gameidJsondata = gameidJsondata1;
utilsTools.setGDataByKey("allAreaSize", gameidJsondata1.getAllValidAreaItemSize());
utilsTools.setGDataByKey("downJsonAsynTask", utilsTools.getTotalMillisecond());
onLoadFileOk(typeId);
return 0;
}
});
}
}
public override bool loadGameImgId(GameScenUserInfo gameUserInfo)
{
string linePath = gameUserInfo.getLineImgLocalPath();
string colorPath = gameUserInfo.getColorImgLocalPath();
string jsonPath = gameUserInfo.getJsonLocalPath();
string thumbnail = gameUserInfo.getLocalThumbnailPath();
if (jsonPath.Equals("") || linePath.Equals("") || colorPath.Equals("") || thumbnail.Equals(""))
{
return false;
}
if (false == gameUserInfo.createWorkDirectory()) return false;
utilsTools.sendEventObjectParams("inGameLoadingValue", 3f, false);
for (short i = 0; i < gameUserInfo.areaInfoUseData.Count; i++)
{
var userAreaData = gameUserInfo.areaInfoUseData[i];
aid2selectOrderIdx.Add(userAreaData.id, i);
}
utilsTools.setGDataByKey("loadBinBegin", utilsTools.getTotalMillisecond());
string binpath = colorPath.Substring(0, linePath.Length - 4) + ".bin";
if (utilsTools.IsPhone == false)
{
binpath = binpath.Replace("/", "\\");
}
Byte[] bytes = File.ReadAllBytes(binpath);
bytesInitDigitMatrix(bytes);
Debug.Log("binʼ--------------");
int start = 0;
int step = BitConverter.GetBytes((short)2).Length;
int stepInt = BitConverter.GetBytes(65539).Length;
short width = BitConverter.ToInt16(bytes, start);
start += step;
short height = BitConverter.ToInt16(bytes, start);
Color[] tempColor = new Color[width * height];
loopAddTaskBack(width, 210, (System.Object[] param) =>
{
int start = (int)param[0];
int step = (int)param[1];
float x = 1.0f;
float y = 1.0f;
int a1 = utilsTools.getTotalMillisecond();
utilsTools.sendEventObjectParams("inGameLoadingValue", 6f, false);
Color defColor = new Color(1, 1, 1, 1);
for (int y1 = 0; y1 < height; y1++)
{
y = y1;
for (int x1 = start; x1 < (start + step); x1++)
{
x = x1;
int index = y1 * gameidJsondata.width + x1;
tempColor[index] = defColor;
}
}
});
TaskManages.getInstance().addTask(this, (System.Object[] _) =>
{
allColor2.Add("outColor", tempColor);
allColorSize.Add("outColor", new Vector2Short(width, height));
});
utilsTools.setGDataByKey("loadBinEnd", utilsTools.getTotalMillisecond());
utilsTools.setGDataByKey("downJson", utilsTools.getTotalMillisecond());
loadFileInfo(gameUserInfo.json, jsonPath, 3);
utilsTools.setGDataByKey("loadGaoQing", utilsTools.getTotalMillisecond());
loadFileInfo(gameUserInfo.img, linePath, 1);
utilsTools.setGDataByKey("loadJpg", utilsTools.getTotalMillisecond());
loadFileInfo(gameUserInfo.finishImg, colorPath, 2);
return true;
}
}
fileFormatVersion: 2
guid: 8eec0659efc440847a5168134fa601ed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -15,7 +15,7 @@ using Unity.VisualScripting;
public class mainGameView : MonoBehaviour
{
private gameIdJsonData gameidJsondata = null;
protected gameIdJsonData gameidJsondata = null;
private string progresName = "";
public GameObject lineImg = null;//线图
public GameObject colorImg = null;//颜色图
......@@ -31,24 +31,24 @@ public class mainGameView : MonoBehaviour
private Texture2D lowImgTexture2d = null;
private Texture2D colorTexure2d = null;
protected short nowSelectgid = -1;
private bool fillAnimation = true;
protected bool fillAnimation = true;
private bool thumbnailIsChange = false;
private string[] initDigitMatrixs = { "", "","" };
private Dictionary<short, short> aid2selectOrderIdx = new Dictionary<short, short>();
protected Dictionary<short, short> aid2selectOrderIdx = new Dictionary<short, short>();
private GameScenUserInfo gameScenUseInfo = null;
//x,y aid 当前帧向量 起点终点 等宽度计算扩散
private List<AreaAnimationDiffuse> showAreaAnimationDatas = new List<AreaAnimationDiffuse>();
private Dictionary<short, GroupByAreaPtInfos> groupPtInfos = new Dictionary<short, GroupByAreaPtInfos>();
private Dictionary<short, GroupByAreaPtInfos> groupPtInfos_All = new Dictionary<short, GroupByAreaPtInfos>();//不管是否涂色都会记录
private short bianlun = -1;
private short fullShow = -2;
protected short bianlun = -1;
protected short fullShow = -2;
private Texture2D thumbnailTexture2d = null;
private bool isDebugTestToEnd = false;
public GameObject clickPosEff = null;
Dictionary<string, Color[]> allColor = new Dictionary<string, Color[]>();
[SerializeField]
private int selectTextureIdx = 1;
static private string[] allSelectTexturePaths = {
protected int selectTextureIdx = 1;
static protected string[] allSelectTexturePaths = {
"scenes/game/cells/buleCell",
"scenes/game/cells/gray",
"scenes/game/cells/grayCell"
......@@ -170,7 +170,7 @@ public class mainGameView : MonoBehaviour
}
}
thumbnailTexture2d.SetPixels(start, 0, step, gameidJsondata.height,colors);
//thumbnailTexture2d.SetPixels(start, 0, step, gameidJsondata.height,colors);
int diff = utilsTools.getTotalMillisecond() - a1;
Debug.Log("*****---- makeThumbnail " + start.ToString() + " diff = " + diff.ToString());
};
......@@ -574,7 +574,7 @@ public class mainGameView : MonoBehaviour
}
}
public void loadFileInfo(string url,string localpath,int typeId)
public virtual void loadFileInfo(string url,string localpath,int typeId)
{
if (typeId == 1 || typeId == 2)
{
......@@ -678,7 +678,7 @@ public class mainGameView : MonoBehaviour
});
}
}
private void bytesInitDigitMatrix(Byte[] bytes)
protected virtual void bytesInitDigitMatrix(Byte[] bytes)
{
int start = 0;
int step = BitConverter.GetBytes((short)2).Length;
......@@ -703,7 +703,7 @@ public class mainGameView : MonoBehaviour
}
digitMatrix = digitMatrixBK;
}
public bool loadGameImgId(GameScenUserInfo gameUserInfo)
public virtual bool loadGameImgId(GameScenUserInfo gameUserInfo)
{
string linePath = gameUserInfo.getLineImgLocalPath();
string colorPath = gameUserInfo.getColorImgLocalPath();
......@@ -761,6 +761,14 @@ public class mainGameView : MonoBehaviour
return true;
}
}
fillAnimation = Boolean.Parse(utilsTools.getGDataByKey<String>("fillanimation", "false"));
int selectId = int.Parse(utilsTools.getGDataByKey<String>("highlight_areas", "0"));
if (selectId < 0 || selectId >= allSelectTexturePaths.Count())
{
selectId = 0;
}
selectTextureIdx = selectId;
gameScenUseInfo = data;
return loadGameImgId(data);
}
//重新加载线图
......@@ -890,7 +898,7 @@ public class mainGameView : MonoBehaviour
}
if (thumbnailTexture2d != null && allColor.ContainsKey("thumbnail") == false)
allColor.Add("thumbnail", thumbnailTexture2d.GetPixels(0, 0, thumbnailTexture2d.width, thumbnailTexture2d.height));
short bianlun = -1;
if (nowSelectgid > 0)
{
jsonGroupInfo = gameidJsondata.getRoomGroup(nowSelectgid);
......@@ -1108,9 +1116,12 @@ public class mainGameView : MonoBehaviour
showBack(aid, true);
return true;
}
private void Update()
{
baseUpdate();
}
// Update is called once per frame
void Update()
protected void baseUpdate()
{
onShowAnimationHandler();
}
......
......@@ -99,10 +99,10 @@ public class nodeNetProxy : MonoBehaviour
}
IEnumerator httpPost(nodeNetProxyItem item)
{
UnityWebRequest request = UnityWebRequest.Post(item.url, (String)item.data["netparams"], "application/json");//, (List<IMultipartFormSection>)item.data["netparams"]);// (WWWForm)item.data["wwwForm"]);
//request.uploadHandler
//request.SetRequestHeader("Content-Type", "application/json");
Debug.Log("httpPost::" + item.url);
Debug.Log("httpPost::" + item.data["netparams"].ToString());
UnityWebRequest request = UnityWebRequest.Post(item.url, (String)item.data["netparams"], "application/json");
yield return request.SendWebRequest();
if (request.isHttpError || request.isNetworkError)
{
......
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