Commit dcfc56ba authored by shujianhe's avatar shujianhe

进度值1错误和部分自动填色小区域待测试

parent ddb1ff81
......@@ -414,6 +414,17 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1255072239 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8910723590317234935, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
m_PrefabInstance: {fileID: 1821187684178258737}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c3deb1e6e6112304d918d673de43ccc6, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1321381574
GameObject:
m_ObjectHideFlags: 0
......@@ -498,9 +509,9 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1821187684178258739}
m_TargetAssemblyTypeName: mainGameView, Assembly-CSharp
m_MethodName: onTipHandler
- m_Target: {fileID: 1255072239}
m_TargetAssemblyTypeName: mainGameScaleMove, Assembly-CSharp
m_MethodName: onAutoFillHander
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
......
......@@ -256,7 +256,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
mainview.getSize(out width, out height);
if (isFirst)
{
int flg = mainview.showAreaByPos(x, y, null);
int flg = mainview.showAreaByPos(x, y, null,false);
if (flg > 0)
{
return true;
......@@ -569,19 +569,28 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
gameAreaItem gameArea = (gameAreaItem)objects[0];
short x = (short)objects[1];
short y = (short)objects[2];
short nowAidByGid = gameArea.gid;
if (nowAidByGid != nowidx) return;
if (groupInfos != null)
{
int operId = 0;
for (int i = 0; i < groupInfos.Count; i++) {
if (groupInfos[i].gid.Equals(nowAidByGid))
{
operId = i;
}
}
var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
colorItem item = null;
groupInfos[nowidx].show++;
if (groupInfos[nowidx].show.Equals(groupInfos[nowidx].size))//直接移除
groupInfos[operId].show++;
if (groupInfos[operId].show.Equals(groupInfos[operId].size))//直接移除
{
if(nowidx == groupInfos.Count - 1)
if(operId == groupInfos.Count - 1)
{
groupInfos.RemoveAt(nowidx);
nowidx--;
groupInfos.RemoveAt(operId);
operId--;
}else
groupInfos.RemoveAt(nowidx);
groupInfos.RemoveAt(operId);
//切换组
if (autoSwitchGroup == false) nowidx = -1;
Vector2 size = gridViewList.getCellSize();
......
......@@ -209,7 +209,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
int schedule = 0;
if (schedule1 < 1.00001)
{
if (allAreaSize < 1)
if (gameScenUserInfo.areaInfoUseData.Count < 1)
schedule = 0;
else
schedule = 1;
......
......@@ -1026,7 +1026,7 @@ public class mainGameView : MonoBehaviour
});
drawThumbnailByAid(new List<short>() { aid });
}
public virtual int showAreaByPos(short x,short y,OnAreaHandler showBack)
public virtual int showAreaByPos(short x,short y,OnAreaHandler showBack,bool ignoreGid = false)
{
if (x >= digitMatrix.RowCount || y >= digitMatrix.ColumnCount || this.nowSelectgid < 0 || x < 0 || y < 0)
{
......@@ -1052,7 +1052,7 @@ public class mainGameView : MonoBehaviour
}
}
var areaItem = gameidJsondata.roomDatas[aid];
if(gameidJsondata.getRoomGroup(nowSelectgid).roomIds.IndexOf(aid) < 0)
if(gameidJsondata.getRoomGroup(nowSelectgid).roomIds.IndexOf(aid) < 0 && ignoreGid.Equals(false))
{
if (showBack != null) showBack(aid, false);
return -4;
......@@ -1080,7 +1080,7 @@ public class mainGameView : MonoBehaviour
AreaAnimationDiffuse areaAnimationDiffuse = new AreaAnimationDiffuse(x, y, aid);
areaAnimationDiffuse.m_fpsStart = 0;
//short m_fpsEnd = utilsTools.getGDataByKey<short>("areaOutValue", areaAnimationDiffuse.m_fpsEnd);
areaAnimationDiffuse.m_fpsEnd = 50;
//areaAnimationDiffuse.m_fpsEnd = 50;
showAreaAnimationDatas.Add(areaAnimationDiffuse);
}
else
......@@ -1104,7 +1104,7 @@ public class mainGameView : MonoBehaviour
rectTransform.localPosition = new Vector3(x1,y1);
GameClickPosEffect gameClickPosEffect = eff.GetComponent<GameClickPosEffect>();
Color color;
gameidJsondata.getRoomGroup(nowSelectgid).getRGB(out color);
gameidJsondata.getRoomGroup(areaItem.gid).getRGB(out color);
gameClickPosEffect.baseColor = color;
gameClickPosEffect.player1(8, 0.3f);
}
......@@ -1354,6 +1354,7 @@ public class mainGameView : MonoBehaviour
//恢复尺寸
//锁定输入
utilsTools.setGDataByKey("enableZoomMove", false);
short gid = nowSelectgid < 0 ? gameidJsondata.roomGroupsData[0].id : nowSelectgid;
List<short> aids = new List<short>();
do
......@@ -1361,7 +1362,31 @@ public class mainGameView : MonoBehaviour
getIdsByAreaId(gid,(short)(20 - aids.Count), ref aids);
gid = gameidJsondata.getNextGid(gid);
} while (gid > -1 && aids.Count < 20);
int idx = 0;
int aidsLen = aids.Count();
//查找
utilsTools.addTimer_Sec(gameObject, "autoFill", (string _) =>
{
short aid = aids[idx];
var infos = gameidJsondata.getAid(aid);
showAreaByPos(infos.px, infos.py, null,true);
idx++;
if(idx.Equals(aidsLen))
{
utilsTools.setGDataByKey("enableZoomMove", true);
return false;
}
aid = aids[idx];
infos = gameidJsondata.getAid(aid);
showAreaByPos(infos.px, infos.py, null,true);
idx++;
if (idx.Equals(aidsLen))
{
utilsTools.setGDataByKey("enableZoomMove", true);
return false;
}
return true;
}, 1, 10);
}
public void onTipHandler()
{
......
......@@ -26,7 +26,7 @@ public class AreaAnimationDiffuse
public short m_y;
public short m_aid;
public short m_fpsStart = 1;//r 开始
public short m_fpsEnd = 40;//r 结束
public short m_fpsEnd = 100;//r 结束
//key beginStart 值 value 这个圆环的像素
public ConcurrentDictionary<short, List<short>> m_datas = new ConcurrentDictionary<short, List<short>>();
public int nowState = 0;//0 尚未开始 1 处理中 2 处理完成
......
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