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