Files
ichni_Creator_Studio/Assets/Feel/MMTools/Foundation/MMLoot/MMLoot.cs
SoulliesOfficial 8d0abec75f 基础内容
必要插件安装
缓动曲线和动画基础
ElementFolder,Track与其次级模块,PathNode重构
2025-01-26 21:10:16 -05:00

47 lines
1.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using MoreMountains.Tools;
using UnityEngine;
namespace MoreMountains.Tools
{
/// <summary>
/// A class defining the contents of a MMLootTable
/// </summary>
/// <typeparam name="T"></typeparam>
public class MMLoot<T>
{
/// the object to return
public T Loot;
/// the weight attributed to this specific object in the table
public float Weight = 1f;
/// the chance percentage to display for this object to be looted. ChancePercentages are meant to be computed by the MMLootTable class
[MMReadOnly]
public float ChancePercentage;
/// the computed low bound of this object's range
public virtual float RangeFrom { get; set; }
/// the computed high bound of this object's range
public virtual float RangeTo { get; set; }
}
/// <summary>
/// a MMLoot implementation for gameobjects
/// </summary>
[System.Serializable]
public class MMLootGameObject : MMLoot<GameObject> { }
/// <summary>
/// a MMLoot implementation for strings
/// </summary>
[System.Serializable]
public class MMLootString : MMLoot<string> { }
/// <summary>
/// a MMLoot implementation for floats
/// </summary>
[System.Serializable]
public class MMLootFloat : MMLoot<float> { }
}