移除了影响打包的部分;

修正了洗牌算法中的错误;
将弱类型中历史记录的功能拆开了,减小了不必要的消耗;
This commit is contained in:
2023-11-01 16:31:58 +08:00
parent 42d3fbc69f
commit 3b8bf5a940
14 changed files with 317 additions and 51 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
using Codice.CM.WorkspaceServer.Tree.GameUI.HeadTree;
using System;
using System.Collections;
@@ -6,7 +6,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
#if UNITY_EDITOR
using Unity.VisualScripting.YamlDotNet.Core.Tokens;
#endif
using UnityEngine;
+3
View File
@@ -1,7 +1,10 @@
using System;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor.Experimental.GraphView;
#endif
using System.Runtime.CompilerServices;
+4 -1
View File
@@ -21,9 +21,12 @@ namespace XericLibrary.Runtime.MacroLibrary
/// <returns></returns>
public static List<int> FisherYatesShuffle(int length, int select)
{
if(select > length)
throw new ArgumentOutOfRangeException("在进行洗牌时,要求输出的项目比拥有的项目更多,这是不合理的。");
var random = new System.Random();
List<int> arr = Enumerable.Range(1, length).ToList();
List<int> arr = Enumerable.Range(0, length).ToList();
List<int> res = new List<int>();
for(int i = 0; i < select; ++i)
+3
View File
@@ -1,7 +1,10 @@
using System;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor.Experimental.GraphView;
#endif
using System.Runtime.CompilerServices;