Commit 3b5a4f44 authored by lijin's avatar lijin

查找功能

parent 82818932
...@@ -18,6 +18,7 @@ public class AutoMgr : MonoBehaviour ...@@ -18,6 +18,7 @@ public class AutoMgr : MonoBehaviour
{ {
return; return;
} }
EventDispatcher.Dispatch(EventName.Event.Event_ReSetPicPos_Scale);
gameObject.SetActive(true); gameObject.SetActive(true);
curAutoTime = 0; curAutoTime = 0;
curAutoCount = 0; curAutoCount = 0;
......
...@@ -69,7 +69,11 @@ public class GameMgr : MonoBehaviour ...@@ -69,7 +69,11 @@ public class GameMgr : MonoBehaviour
{ {
aMgr.Play(); aMgr.Play();
} }
//查找返回接口
public RoomDatas LookFor()
{
return md.LookFor();
}
#endregion #endregion
#region 点击事件逻辑 #region 点击事件逻辑
......
...@@ -113,7 +113,7 @@ public class MainData : MonoBehaviour ...@@ -113,7 +113,7 @@ public class MainData : MonoBehaviour
//y越界 //y越界
if (v.y < 0 || v.y >= json.height) { return; } if (v.y < 0 || v.y >= json.height) { return; }
//涂过了,或点击到线 //涂过了,或点击到线
if (c_png[Index] != Color.white) { return ; } if (c_png[Index] != Color.white) { return; }
Color c = c_map[Index];//点击的点阵数据:rgba,rg为房间ID,ba为组ID Color c = c_map[Index];//点击的点阵数据:rgba,rg为房间ID,ba为组ID
int groupId = ResJsonData.ColorToV(c).y; int groupId = ResJsonData.ColorToV(c).y;
...@@ -167,4 +167,22 @@ public class MainData : MonoBehaviour ...@@ -167,4 +167,22 @@ public class MainData : MonoBehaviour
} }
} }
} }
//查找返回接口
public RoomDatas LookFor()
{
if (curGroupId == -1)
{
return null;
}
List<int> list = json.roomGroupsData[curGroupId - 1].roomIds;//当前选中组全部房间ID
for (int i = 0; i < list.Count; i++)
{
if (!dynamic.step.Contains(list[i]))
{
return json.roomDatas[list[i]];
}
}
return null;
}
} }
\ No newline at end of file
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