Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/BitStrap/Examples/FastRandomExample.cs
2026-02-21 16:45:37 +08:00

33 lines
555 B
C#

using UnityEngine;
namespace BitStrap.Examples
{
public class FastRandomExample : MonoBehaviour
{
[Header("Edit the fields and click the buttons to test them!")]
public int seed = 137;
[ReadOnly]
public int randomInteger;
private FastRandom randomGenerator = new FastRandom();
[Button]
public void SetSeed()
{
randomGenerator.SetSeed(seed);
}
[Button]
public void GenerateRandomIntegerForSeed()
{
randomInteger = randomGenerator.GetNextInt();
}
private void Awake()
{
randomGenerator.SetSeed(seed);
}
}
}