Commit ac8baf3f authored by shujianhe's avatar shujianhe

1

parent b3e87a9a
fileFormatVersion: 2
guid: f2ecd7a0e0eead542999710d3149cbdf
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -285,7 +285,7 @@ RectTransform: ...@@ -285,7 +285,7 @@ RectTransform:
m_GameObject: {fileID: 514566347} m_GameObject: {fileID: 514566347}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.4, y: 0.4, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1246613933} - {fileID: 1246613933}
......
...@@ -236,6 +236,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler ...@@ -236,6 +236,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
} }
var gameBackJavaData = utilsTools.getGDataByKey<GameBackJavaData>("gameBackJavaData", null); var gameBackJavaData = utilsTools.getGDataByKey<GameBackJavaData>("gameBackJavaData", null);
gameBackJavaData.schedule = schedule; gameBackJavaData.schedule = schedule;
gameBackJavaData.path = gameScenUserInfo.getLocalThumbnailPath();
utilsTools.setGDataByKey("gameBackJavaData", gameBackJavaData); utilsTools.setGDataByKey("gameBackJavaData", gameBackJavaData);
updateProgress(); updateProgress();
......
...@@ -32,7 +32,6 @@ public class mainGameView : MonoBehaviour ...@@ -32,7 +32,6 @@ public class mainGameView : MonoBehaviour
private Texture2D colorTexure2d = null; private Texture2D colorTexure2d = null;
protected short nowSelectgid = -1; protected short nowSelectgid = -1;
protected bool fillAnimation = true; protected bool fillAnimation = true;
private bool thumbnailIsChange = false;
private string[] initDigitMatrixs = { "", "","" }; private string[] initDigitMatrixs = { "", "","" };
protected Dictionary<short, short> aid2selectOrderIdx = new Dictionary<short, short>(); protected Dictionary<short, short> aid2selectOrderIdx = new Dictionary<short, short>();
protected GameScenUserInfo gameScenUseInfo = null; protected GameScenUserInfo gameScenUseInfo = null;
...@@ -133,7 +132,11 @@ public class mainGameView : MonoBehaviour ...@@ -133,7 +132,11 @@ public class mainGameView : MonoBehaviour
if(allColor.ContainsKey("line") == false) if(allColor.ContainsKey("line") == false)
allColor.Add("line", lineTexture2d.GetPixels(0, 0, gameidJsondata.width, gameidJsondata.height)); allColor.Add("line", lineTexture2d.GetPixels(0, 0, gameidJsondata.width, gameidJsondata.height));
else else
allColor.Add("line", lineTexture2d.GetPixels(0, 0, gameidJsondata.width, gameidJsondata.height)); allColor["line"] = lineTexture2d.GetPixels(0, 0, gameidJsondata.width, gameidJsondata.height);
if (allColor.ContainsKey("thumbnail") == false)
allColor.Add("thumbnail", thumbnailTexture2d.GetPixels(0, 0, thumbnailTexture2d.width, thumbnailTexture2d.height));
else
allColor["thumbnail"] = thumbnailTexture2d.GetPixels(0, 0, thumbnailTexture2d.width, thumbnailTexture2d.height);
TaskItemBack taskItemBack = (System.Object[] param) => TaskItemBack taskItemBack = (System.Object[] param) =>
{ {
int start = (int)param[0]; int start = (int)param[0];
...@@ -158,9 +161,13 @@ public class mainGameView : MonoBehaviour ...@@ -158,9 +161,13 @@ public class mainGameView : MonoBehaviour
{ {
var color = colorTexure2d.GetPixelBilinear(x / width, y / height); var color = colorTexure2d.GetPixelBilinear(x / width, y / height);
color.a = 1f; color.a = 1f;
colors[index] = color; allColor["thumbnail"][index] = color;
} }
else
{
allColor["thumbnail"][index] = new Color(1, 1, 1, 1);
}
if(nowValue.Equals(fullShow)) if(nowValue.Equals(fullShow))
{ {
Color color1 = allColor["line"][index]; Color color1 = allColor["line"][index];
...@@ -170,9 +177,6 @@ public class mainGameView : MonoBehaviour ...@@ -170,9 +177,6 @@ public class mainGameView : MonoBehaviour
} }
} }
//thumbnailTexture2d.SetPixels(start, 0, step, gameidJsondata.height,colors);
int diff = utilsTools.getTotalMillisecond() - a1;
Debug.Log("*****---- makeThumbnail " + start.ToString() + " diff = " + diff.ToString());
}; };
loopAddTaskBack(gameidJsondata.width,340,taskItemBack); loopAddTaskBack(gameidJsondata.width,340,taskItemBack);
tm.addTask(this, (System.Object[] param) => tm.addTask(this, (System.Object[] param) =>
...@@ -858,11 +862,6 @@ public class mainGameView : MonoBehaviour ...@@ -858,11 +862,6 @@ public class mainGameView : MonoBehaviour
public virtual bool switchShowAreaGroup(short gid, OnAreaHandler onAreaHandler = null) public virtual bool switchShowAreaGroup(short gid, OnAreaHandler onAreaHandler = null)
{ {
//utilsTools.setGDataByKey("makeThumbnailBegin", utilsTools.getTotalMillisecond());
if(utilsTools.ContainsKeyGDataByKey("firstSwitchShowAreaBegin") == false)
{
utilsTools.setGDataByKey("firstSwitchShowAreaBegin", utilsTools.getTotalMillisecond());
}
if (gid .Equals(nowSelectgid)) if (gid .Equals(nowSelectgid))
{ {
if(onAreaHandler != null) if(onAreaHandler != null)
...@@ -894,8 +893,6 @@ public class mainGameView : MonoBehaviour ...@@ -894,8 +893,6 @@ public class mainGameView : MonoBehaviour
{ {
allColor["low"] = lowImgTexture2d.GetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height); allColor["low"] = lowImgTexture2d.GetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height);
} }
if (thumbnailTexture2d != null && allColor.ContainsKey("thumbnail") == false)
allColor.Add("thumbnail", thumbnailTexture2d.GetPixels(0, 0, thumbnailTexture2d.width, thumbnailTexture2d.height));
if (nowSelectgid > 0) if (nowSelectgid > 0)
{ {
...@@ -915,7 +912,6 @@ public class mainGameView : MonoBehaviour ...@@ -915,7 +912,6 @@ public class mainGameView : MonoBehaviour
{ {
if (digitMatrix.Data[pt.x, pt.y] == bianlun) continue; if (digitMatrix.Data[pt.x, pt.y] == bianlun) continue;
color.a = 0f; color.a = 0f;
//lowImgTexture2d.SetPixel(pt.y, pt.x, color);
allColor["low"][pt.y * gameidJsondata.width + pt.x] = color; allColor["low"][pt.y * gameidJsondata.width + pt.x] = color;
} }
} }
...@@ -945,12 +941,14 @@ public class mainGameView : MonoBehaviour ...@@ -945,12 +941,14 @@ public class mainGameView : MonoBehaviour
this.nowSelectColors.getTiledColor(pt.x, pt.y, ref color); this.nowSelectColors.getTiledColor(pt.x, pt.y, ref color);
color.a = 1f; color.a = 1f;
allColor["low"][pt.y * gameidJsondata.width + pt.x] = color; allColor["low"][pt.y * gameidJsondata.width + pt.x] = color;
//lowImgTexture2d.SetPixel(pt.y, pt.x, color);
} }
} }
if (utilsTools.getGDataByKey<bool>("autoFillColor", false) == false)
{
lowImgTexture2d.SetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height, allColor["low"]); lowImgTexture2d.SetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height, allColor["low"]);
lowImgTexture2d.Apply(); lowImgTexture2d.Apply();
lowImg.SetActive(true); lowImg.SetActive(true);
}
if (onAreaHandler != null) if (onAreaHandler != null)
onAreaHandler(gid, true); onAreaHandler(gid, true);
if (utilsTools.ContainsKeyGDataByKey("firstSwitchShowAreaEnd") == false) if (utilsTools.ContainsKeyGDataByKey("firstSwitchShowAreaEnd") == false)
...@@ -1219,7 +1217,7 @@ public class mainGameView : MonoBehaviour ...@@ -1219,7 +1217,7 @@ public class mainGameView : MonoBehaviour
if (showAreaAnimationDatas.Count == 0) if (showAreaAnimationDatas.Count == 0)
{ {
//保存一次缩略遮罩图 //保存一次缩略遮罩图
thumbnailIsChange = true;
if (utilsTools.isEqualByValue(gameScenUseInfo.progress, 1.0, 0.0000002f)) if (utilsTools.isEqualByValue(gameScenUseInfo.progress, 1.0, 0.0000002f))
{ {
TaskManages.getInstance().addTask(this, (System.Object[] parma) => TaskManages.getInstance().addTask(this, (System.Object[] parma) =>
...@@ -1255,7 +1253,6 @@ public class mainGameView : MonoBehaviour ...@@ -1255,7 +1253,6 @@ public class mainGameView : MonoBehaviour
int y1 = (int)((float)y / (float)gameidJsondata.height * colorTexure2d.height); int y1 = (int)((float)y / (float)gameidJsondata.height * colorTexure2d.height);
thumbnail[value] = jpgColors[y1 * colorTexure2d.width + x1]; thumbnail[value] = jpgColors[y1 * colorTexure2d.width + x1];
} }
thumbnailIsChange = true;
}; };
for (int i = 0; i < aids.Count; i++) for (int i = 0; i < aids.Count; i++)
{ {
...@@ -1362,6 +1359,7 @@ public class mainGameView : MonoBehaviour ...@@ -1362,6 +1359,7 @@ public class mainGameView : MonoBehaviour
return 0; return 0;
} }
} }
//自动填充的主要计算方式
public virtual void onAutoFillHandler() public virtual void onAutoFillHandler()
{ {
//恢复尺寸 //恢复尺寸
...@@ -1414,6 +1412,7 @@ public class mainGameView : MonoBehaviour ...@@ -1414,6 +1412,7 @@ public class mainGameView : MonoBehaviour
return true; return true;
}, 0.8, 10); }, 0.8, 10);
} }
//提示的查找过程
public void onTipHandler() public void onTipHandler()
{ {
if (isDebugTestToEnd == false) if (isDebugTestToEnd == false)
...@@ -1513,6 +1512,7 @@ public class mainGameView : MonoBehaviour ...@@ -1513,6 +1512,7 @@ public class mainGameView : MonoBehaviour
utilsTools.sendEventObjectParams("gamePlayerEndHandler"); utilsTools.sendEventObjectParams("gamePlayerEndHandler");
} }
} }
//加载小的选中图的保存过程,如果需要三合一的方式mainGameOneImageView的处理方式
protected virtual void loadSelectImageTexture(Texture2D nowSelectTexture,NotifyEmptParam notify, int width = 0,int height = 0) protected virtual void loadSelectImageTexture(Texture2D nowSelectTexture,NotifyEmptParam notify, int width = 0,int height = 0)
{ {
if(width == 0 || height == 0) if(width == 0 || height == 0)
......
...@@ -15,6 +15,7 @@ public class utilsDB ...@@ -15,6 +15,7 @@ public class utilsDB
private static Dictionary<string, Dictionary<String, List<System.Object>>> debugDBTables = new Dictionary<string, Dictionary<string, List<System.Object>>>(); private static Dictionary<string, Dictionary<String, List<System.Object>>> debugDBTables = new Dictionary<string, Dictionary<string, List<System.Object>>>();
static utilsDB() static utilsDB()
{ {
if(utilsTools.IsWin)
PlayerPrefs.DeleteAll(); PlayerPrefs.DeleteAll();
string path = utilsTools.copyFile("tsmi.db"); string path = utilsTools.copyFile("tsmi.db");
if(path.Equals("") == true) if(path.Equals("") == true)
......
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