18 lines
369 B
C#
18 lines
369 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// 概率管理器
|
|
/// </summary>
|
|
public class ProbabilityManager : SingletonManager<ProbabilityManager>
|
|
{
|
|
/// <summary>
|
|
/// 百分之60概率
|
|
/// </summary>
|
|
public bool GetPercent(int value)
|
|
{
|
|
return Random.Range(0, 100) < value;
|
|
}
|
|
}
|