feature: Added random buttons

This commit is contained in:
Gerard Gascón 2024-01-28 00:39:34 +01:00
parent 5d5af8a4c6
commit 2c91a0cb0f
15 changed files with 2461 additions and 36 deletions

View file

@ -0,0 +1,14 @@
using System.Collections.Generic;
using UnityEngine;
namespace Utilities {
public static class RandomExtensions {
public static void Shuffle<T>(this List<T> array) {
int n = array.Count;
while (n > 1) {
int k = Random.Range(0, n--);
(array[n], array[k]) = (array[k], array[n]);
}
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d3a2119b90024ecd94ba7fa9711378db
timeCreated: 1706397620