Browse Source

unitask改动

pull/202/head
yjm484 3 months ago
parent
commit
cfe1afacdf
  1. 12
      ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs
  2. BIN
      ColorlessWorld-2024-4-2/obj/Debug/Assembly-CSharp-Editor.csproj.AssemblyReference.cache

12
ColorlessWorld-2024-4-2/Assets/Scripts/MapUnity.cs

@ -331,8 +331,8 @@ public class MapUnity : MonoBehaviour
if (whoColour != 6 && whoColour != 10) if (whoColour != 6 && whoColour != 10)
{ {
whoColour = newColor; whoColour = newColor;
BombAct(newColor);
RefreshWhoColor(); RefreshWhoColor();
BombAct(newColor).Forget();
} }
} }
@ -451,8 +451,8 @@ public class MapUnity : MonoBehaviour
if (whoColour != 6 && whoColour != 10) if (whoColour != 6 && whoColour != 10)
{ {
whoColour = newColor; whoColour = newColor;
BombAct(newColor);
RefreshWhoColor(); RefreshWhoColor();
BombAct(newColor).Forget();
} }
} }
@ -496,8 +496,8 @@ public class MapUnity : MonoBehaviour
continue; continue;
} }
whoColour = newColor; whoColour = newColor;
BombAct(newColor);
RefreshWhoColor(); RefreshWhoColor();
BombAct(newColor).Forget();
} }
} }
IEnumerator SettleWeaponNode() IEnumerator SettleWeaponNode()
@ -528,7 +528,7 @@ public class MapUnity : MonoBehaviour
} }
} }
public void BombAct(int newColor) public async UniTaskVoid BombAct(int newColor)
{ {
if(blockNode!=null&&blockNode is Bomb) if(blockNode!=null&&blockNode is Bomb)
{ {
@ -536,8 +536,8 @@ public class MapUnity : MonoBehaviour
nodeRange.Add(this); nodeRange.Add(this);
getNodeTools.getCircleNodeExceptSelf(nodeRange, 1); getNodeTools.getCircleNodeExceptSelf(nodeRange, 1);
Debug.Log("getCircleNodeExceptSelf´óСÊÇ" + nodeRange.Count); Debug.Log("getCircleNodeExceptSelf´óСÊÇ" + nodeRange.Count);
//await UniTask.Delay(100, ignoreTimeScale: true); await UniTask.Delay(100, ignoreTimeScale: true);
//await UniTask.SwitchToMainThread(); await UniTask.SwitchToMainThread();
foreach (MapUnity node in nodeRange) foreach (MapUnity node in nodeRange)
{ {
node.switchColor(Name.intColorTostring(newColor)); node.switchColor(Name.intColorTostring(newColor));

BIN
ColorlessWorld-2024-4-2/obj/Debug/Assembly-CSharp-Editor.csproj.AssemblyReference.cache

Binary file not shown.
Loading…
Cancel
Save