RustDedicated/Assembly-CSharp/SkinSetCollection.cs
2025-05-25 05:29:54 +09:30

17 lines
380 B
C#

using UnityEngine;
[CreateAssetMenu(menuName = "Rust/Skin Set Collection")]
public class SkinSetCollection : ScriptableObject
{
public SkinSet[] Skins;
public int GetIndex(float MeshNumber)
{
return Mathf.Clamp(Mathf.FloorToInt(MeshNumber * (float)Skins.Length), 0, Skins.Length - 1);
}
public SkinSet Get(float MeshNumber)
{
return Skins[GetIndex(MeshNumber)];
}
}