Commit f9d29f48 authored by Ever's avatar Ever

同步代码

parent 2dac4321
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
[CustomEditor(typeof(MainData))]
public class MainDataEditor : Editor
{
public override void OnInspectorGUI()
{
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: f0618fb938977c644b8e2f1809b68d0f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -35,4 +35,162 @@ public class GameMgr : MonoBehaviour
{
gray = _gray;
}
public static int gunSize = 50;
void Update()
{
Scale();
Click();
}
#region 拖拽
//private bool isDrag = false;
//private Vector2 StartPos = Vector2.zero;
//private Vector2 EndPos = Vector2.zero;
//public void OnBeginDrag(PointerEventData eventData)
//{
// isDrag = true;
// RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, Input.mousePosition, Camera.main, out StartPos);
//}
//public void OnDrag(PointerEventData eventData)
//{
// if (!isDrag) { return; }
// RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, Input.mousePosition, Camera.main, out EndPos);
// Vector3 v = EndPos - StartPos;
// transform.localPosition += v;
//}
//public void OnEndDrag(PointerEventData eventData)
//{
// isDrag = false;
//}
#endregion
#region 缩放
private Vector2 Pos_1;
private Vector2 Pos_2;
public void Scale()
{
if (Input.touchCount == 2)
{
if (Input.GetTouch(0).phase == TouchPhase.Moved || Input.GetTouch(1).phase == TouchPhase.Moved)
{
Vector2 n_Pos_1 = Input.GetTouch(0).position;
Vector2 n_Pos_2 = Input.GetTouch(1).position;
if (Vector2.Distance(Pos_1, Pos_2) < Vector2.Distance(n_Pos_1, n_Pos_2))
{
transform.parent.localScale += Vector3.one * 0.25f;
if (transform.parent.localScale.x > 4)
{
transform.parent.localScale = Vector3.one * 4;
}
}
else
{
transform.parent.localScale -= Vector3.one * 0.25f;
if (transform.parent.localScale.x < 0.6f)
{
transform.parent.localScale = Vector3.one * 0.6f;
}
}
Pos_1 = n_Pos_1;
Pos_2 = n_Pos_2;
tiMgr.SizeChange(transform.parent.localScale.x);
}
}
}
#endregion
#region 点击
private float time = 0;
private Vector2 pos = Vector2.zero;
private int isLongPress = -1;//-1无逻辑,0按下,1响应点击,2响应长按
public void Click()
{
if (Input.GetMouseButtonDown(0))
{
isLongPress = 0;
pos = Input.mousePosition;
time = Time.unscaledTime;
}
float d = Vector2.Distance(pos, Input.mousePosition);
if (d < 10)
{
float f = Time.unscaledTime - time;
if (Input.GetMouseButtonUp(0))
{
if (isLongPress == 0)
{
Vector2 v;
RectTransformUtility.ScreenPointToLocalPointInRectangle(md.rect, Input.mousePosition, Camera.main, out v);
if (f < 0.5f)
{
isLongPress = -1;
Debug.Log("点击:" + v);
UseGun(v);
}
}
}
if (f > 3 && isLongPress == 0)
{
isLongPress = -1;
Vector2 v;
RectTransformUtility.ScreenPointToLocalPointInRectangle(md.rect, Input.mousePosition, Camera.main, out v);
v.x = v.x + md.png.width / 2;
v.y = v.y + md.png.height / 2;
Debug.Log("长按:" + v);
v.x = (int)v.x;
v.y = (int)v.y;
md.OnLongPressPos(v);
}
}
else
{
isLongPress = -1;
}
}
public void UseGun(Vector2 v)
{
List<Vector2> list = new List<Vector2>();
for (int i = 0; i < gunSize; i++)
{
for (int j = 0; j < gunSize; j++)
{
Vector2 temp = new Vector2((int)v.x + i - gunSize / 2, (int)v.y + j - gunSize / 2);
list.Add(temp);
}
}
list.Sort((a, b) =>
{
float d_a = Vector2.Distance(a, v);
float d_b = Vector2.Distance(b, v);
return d_a.CompareTo(d_b);
});
for (int i = 0; i < list.Count; i++)
{
if (OnClickPixel(list[i]))
{
return;
}
}
}
public bool OnClickPixel(float x, float y)
{
Vector2 v = new Vector2(x + md.png.width / 2, y + md.png.height / 2);
return md.OnClickPos(v);
}
public bool OnClickPixel(Vector2 v)
{
v.x = v.x + md.png.width / 2;
v.y = v.y + md.png.height / 2;
return md.OnClickPos(v);
}
#endregion
public void Clear_Test()
{
}
}
......@@ -10,7 +10,6 @@ using UnityEngine.UI;
public class MainData : MonoBehaviour
{
public static int gunSize = 50;
public static Vector4 config = new Vector4(0, 150, 725f, 725f);
public string key = "";
......@@ -25,12 +24,6 @@ public class MainData : MonoBehaviour
public RectTransform rect;
public int curGroupId = -1;
void Update()
{
Scale();
Click();
}
public void Init(string _key, Texture2D _png, Sprite _jpg, ResJsonData _json)
{
key = _key;
......@@ -53,130 +46,11 @@ public class MainData : MonoBehaviour
EventDispatcher.Dispatch(EventName.Event.Event_GroupListCreate, json.roomGroupsData);
}
#region 拖拽
//private bool isDrag = false;
//private Vector2 StartPos = Vector2.zero;
//private Vector2 EndPos = Vector2.zero;
//public void OnBeginDrag(PointerEventData eventData)
//{
// isDrag = true;
// RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, Input.mousePosition, Camera.main, out StartPos);
//}
//public void OnDrag(PointerEventData eventData)
//{
// if (!isDrag) { return; }
// RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, Input.mousePosition, Camera.main, out EndPos);
// Vector3 v = EndPos - StartPos;
// transform.localPosition += v;
//}
//public void OnEndDrag(PointerEventData eventData)
//{
// isDrag = false;
//}
#endregion
#region 缩放
private Vector2 Pos_1;
private Vector2 Pos_2;
public void Scale()
{
if (Input.touchCount == 2)
{
if (Input.GetTouch(0).phase == TouchPhase.Moved || Input.GetTouch(1).phase == TouchPhase.Moved)
{
Vector2 n_Pos_1 = Input.GetTouch(0).position;
Vector2 n_Pos_2 = Input.GetTouch(1).position;
if (Vector2.Distance(Pos_1, Pos_2) < Vector2.Distance(n_Pos_1, n_Pos_2))
{
transform.parent.localScale += Vector3.one * 0.25f;
if (transform.parent.localScale.x > 4)
{
transform.parent.localScale = Vector3.one * 4;
}
}
else
{
transform.parent.localScale -= Vector3.one * 0.25f;
if (transform.parent.localScale.x < 0.6f)
{
transform.parent.localScale = Vector3.one * 0.6f;
}
}
Pos_1 = n_Pos_1;
Pos_2 = n_Pos_2;
GameMgr.Ins.tiMgr.SizeChange(transform.parent.localScale.x);
}
}
}
#endregion
#region 点击
private float time = 0;
private Vector2 pos = Vector2.zero;
public void Click()
{
if (Input.GetMouseButtonDown(0))
{
pos = Input.mousePosition;
time = Time.unscaledTime;
}
if (Input.GetMouseButtonUp(0))
{
float f = Time.unscaledTime - time;
float d = Vector2.Distance(pos, Input.mousePosition);
Vector2 v;
RectTransformUtility.ScreenPointToLocalPointInRectangle(rect, Input.mousePosition, Camera.main, out v);
if (f < 0.5f && d < 10)
{
Debug.Log("点击:" + v);
UseGun(v);
}
}
}
public void UseGun(Vector2 v)
{
List<Vector2> list = new List<Vector2>();
for (int i = 0; i < gunSize; i++)
{
for (int j = 0; j < gunSize; j++)
{
Vector2 temp = new Vector2((int)v.x + i - gunSize / 2, (int)v.y + j - gunSize / 2);
list.Add(temp);
}
}
list.Sort((a, b) =>
{
float d_a = Vector2.Distance(a, v);
float d_b = Vector2.Distance(b, v);
return d_a.CompareTo(d_b);
});
for (int i = 0; i < list.Count; i++)
{
if (OnClickPixel(list[i]))
{
return;
}
}
}
public bool OnClickPixel(float x, float y)
{
Vector2 v = new Vector2(x + png.width / 2, y + png.height / 2);
return OnClickPos(v);
}
public bool OnClickPixel(Vector2 v)
{
v.x = v.x + png.width / 2;
v.y = v.y + png.height / 2;
return OnClickPos(v);
}
#endregion
public bool OnClickPos(Vector2 v)
{
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
if (v.x < 0 || v.x >= png.width)
{
//Debug.Log("x越界:" + v.x);
......@@ -192,8 +66,6 @@ public class MainData : MonoBehaviour
//Debug.Log("涂过了");
return false;
}
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
int id = json.All[(int)(v.x + v.y * png.width)];
if (FunDo(id, v))
{
......@@ -226,6 +98,7 @@ public class MainData : MonoBehaviour
}
png.SetPixels(c_png);
png.Apply();
GameMgr.Ins.giMgr.CircleId(id);
GameMgr.Ins.tiMgr.CircleId(id);
GameMgr.Ins.miMgr.Create(this, erd, v);
......@@ -240,8 +113,11 @@ public class MainData : MonoBehaviour
public void ChooseGroup(int id)
{
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
Debug.Log("选中组:" + id);
if(curGroupId == id)
{
return;
}
curGroupId = id;
List<int> list = new List<int>();
List<RoomGroupsData> l = json.roomGroupsData;
......@@ -270,7 +146,32 @@ public class MainData : MonoBehaviour
{
GameMgr.Ins.giMgr.Create(this, dic[list[i]], list[i]);
}
sw.Stop();
Debug.Log("耗时:" + sw.ElapsedMilliseconds);
}
public void OnLongPressPos(Vector2 v)
{
if (v.x < 0 || v.x >= png.width)
{
//Debug.Log("x越界:" + v.x);
return;
}
if (v.y < 0 || v.y >= png.height)
{
//Debug.Log("y越界:" + v.y);
return;
}
if (png.GetPixel((int)v.x, (int)v.y) != Color.white)
{
//Debug.Log("涂过了");
return;
}
int id = json.All[(int)(v.x + v.y * png.width)];
for (int i = 0; i < json.roomGroupsData.Count; i++)
{
if (json.roomGroupsData[i].roomIds.Contains(id))
{
ChooseGroup(json.roomGroupsData[i].id);
}
}
}
}
......@@ -525,9 +525,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 3718553484409595390}
- component: {fileID: 3540624124884326624}
- component: {fileID: 735149898379688925}
- component: {fileID: 2452091612914919276}
m_Layer: 5
m_Name: Viewport
m_TagString: Untagged
......@@ -556,57 +553,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!222 &3540624124884326624
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2370487241309862268}
m_CullTransparentMesh: 1
--- !u!114 &735149898379688925
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2370487241309862268}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &2452091612914919276
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2370487241309862268}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!1 &2436549110189993140
GameObject:
m_ObjectHideFlags: 0
......@@ -1138,15 +1084,15 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_Color: {r: 1, g: 1, b: 1, a: 0.003921569}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_Sprite: {fileID: 21300000, guid: d4eabdb0284b6d04b897c23d6b72a89c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
......
......@@ -800,6 +800,82 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a84e71b0940ee354b88759c457e77bf0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &393047723
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 393047724}
- component: {fileID: 393047726}
- component: {fileID: 393047725}
m_Layer: 5
m_Name: fore
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &393047724
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 393047723}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 824212553}
m_RootOrder: -1
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: 0}
m_SizeDelta: {x: 55, y: 55}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &393047725
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 393047723}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b42c4b754bf4ff34d9602087cdab6bf8, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &393047726
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 393047723}
m_CullTransparentMesh: 1
--- !u!1 &414882560
GameObject:
m_ObjectHideFlags: 0
......@@ -1303,6 +1379,140 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 800914854}
m_CullTransparentMesh: 1
--- !u!1 &824212552
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 824212553}
- component: {fileID: 824212556}
- component: {fileID: 824212555}
- component: {fileID: 824212554}
m_Layer: 5
m_Name: Test
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &824212553
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 824212552}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 393047724}
m_Father: {fileID: 1147557151012020857}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 427, y: -82.500015}
m_SizeDelta: {x: 87, y: 91}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &824212554
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 824212552}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 824212555}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9106039126864166767}
m_TargetAssemblyTypeName: GroupListManager, Assembly-CSharp
m_MethodName: Test_Btn
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 1
--- !u!114 &824212555
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 824212552}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: c24d2a60900d07146b57d3a3082bb957, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &824212556
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 824212552}
m_CullTransparentMesh: 1
--- !u!1 &854696068
GameObject:
m_ObjectHideFlags: 0
......@@ -3988,6 +4198,7 @@ RectTransform:
- {fileID: 2223982587779595025}
- {fileID: 4335846223123258697}
- {fileID: 7418061516327095409}
- {fileID: 824212553}
- {fileID: 3055440550137239661}
- {fileID: 4308989954153359746}
- {fileID: 8264718637096921617}
......
fileFormatVersion: 2
guid: c4b5e1ac60a10e24fb982d81e734d51a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 240999ec40af1f642a0da2ccb30cbb9e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
<linker>
<assembly fullname="Unity.VisualScripting.Core" preserve="all" />
<assembly fullname="Unity.VisualScripting.Flow" preserve="all" />
<assembly fullname="Unity.VisualScripting.State" preserve="all" />
</linker>
\ No newline at end of file
fileFormatVersion: 2
guid: 7bcc66944a848e740ad8354eddbe4a1a
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -6,7 +6,6 @@ using UnityEngine;
using UnityEngine.UI;
using System.Linq;
using DG.Tweening;
using static UnityEditor.Progress;
using TMPro;
public class GroupListManager : MonoBehaviour
......@@ -38,34 +37,6 @@ public class GroupListManager : MonoBehaviour
AllProcress_Text.gameObject.SetActive(true);
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.A))
{
List<short> list = new List<short>();
for (int i = 0; i < 1; i++)
{
for (int j = 0; j < 2048; j++)
{
list.Add((short)UnityEngine.Random.Range(0, 1000));
}
}
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
for (int i = 0; i < 12; i++)
{
sw.Start();
for (int j = 0; j < list.Count; j++)
{
}
sw.Stop();
Debug.Log("耗时:" + sw.ElapsedMilliseconds);
}
}
}
private void ResiterEvent(bool flag)
{
EventDispatcher.RegisterEvent(EventName.Event.Event_GroupListCreate, CreateGroup, flag);
......@@ -213,4 +184,9 @@ public class GroupListManager : MonoBehaviour
Debug.Log("点返回");
EventDispatcher.Dispatch(EventName.Event.Event_BackToHome);
}
public void Test_Btn()
{
GameMgr.Ins.Clear_Test();
}
}
......@@ -7,7 +7,6 @@ using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using static UnityEngine.InputManagerEntry;
public class colorItem : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
......
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