新增volume更新器
This commit is contained in:
19
Assets/Scripts/Volume/Updatement/VolumeIntUpdatement.cs
Normal file
19
Assets/Scripts/Volume/Updatement/VolumeIntUpdatement.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Demo.Attr;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
[Scriptable]
|
||||
public class VolumeIntUpdatement : BaseVolumeUpdatement<int>
|
||||
{
|
||||
public static VolumeIntUpdatement Make()
|
||||
{
|
||||
return new GameObject().AddComponent<VolumeIntUpdatement>();
|
||||
}
|
||||
|
||||
protected override int Lerp(int begin, int end, float t)
|
||||
{
|
||||
return Mathf.FloorToInt(Mathf.Lerp(begin, end, t));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user