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)
{
whoColour = newColor;
BombAct(newColor);
RefreshWhoColor();
BombAct(newColor).Forget();
}
}
@ -451,8 +451,8 @@ public class MapUnity : MonoBehaviour
if (whoColour != 6 && whoColour != 10)
{
whoColour = newColor;
BombAct(newColor);
RefreshWhoColor();
BombAct(newColor).Forget();
}
}
@ -496,8 +496,8 @@ public class MapUnity : MonoBehaviour
continue;
}
whoColour = newColor;
BombAct(newColor);
RefreshWhoColor();
BombAct(newColor).Forget();
}
}
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)
{
@ -536,8 +536,8 @@ public class MapUnity : MonoBehaviour
nodeRange.Add(this);
getNodeTools.getCircleNodeExceptSelf(nodeRange, 1);
Debug.Log("getCircleNodeExceptSelf´óСÊÇ" + nodeRange.Count);
//await UniTask.Delay(100, ignoreTimeScale: true);
//await UniTask.SwitchToMainThread();
await UniTask.Delay(100, ignoreTimeScale: true);
await UniTask.SwitchToMainThread();
foreach (MapUnity node in nodeRange)
{
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