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

21 lines
357 B
C#

using UnityEngine;
public class RandomDestroy : MonoBehaviour
{
public uint Seed;
public float Probability = 0.5f;
protected void Start()
{
uint seed = base.transform.position.Seed(World.Seed + Seed);
if (SeedRandom.Value(ref seed) > Probability)
{
GameManager.Destroy(this);
}
else
{
GameManager.Destroy(base.gameObject);
}
}
}