Archived
添加了更多的材质函数,部分与引擎新特性重合,这是为了能够脱离引擎在多个版本中更具可移植性。
添加了多种对程序流程控制与保全的脚本,而且现在可以更快速的构建一个具有线性关系的协程了。 添加了一个支持多种模式的单维梯度控制器,类似unity的颜色梯度类型。 添加了一个用于看向某个物体的旋转控制器。 添加了一个加载宏。 完善了批处理脚本流程。
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -9,8 +10,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
{
|
||||
public static partial class MacroMath
|
||||
{
|
||||
|
||||
#region 文本
|
||||
#region 名称文本
|
||||
|
||||
/// <summary>
|
||||
/// 获取此处的物体名称,如果带有(clone)后缀,则省略这个后缀
|
||||
@@ -39,6 +39,28 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
|
||||
#endregion
|
||||
|
||||
#region 转文本
|
||||
|
||||
/// <summary>
|
||||
/// 将一个数值四舍五入后转为一个文本,并保留特定的小数点位,如果这个小数位为0则省略不写
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="decimals">目标小数位</param>
|
||||
/// <returns></returns>
|
||||
public static string RoundToString(this double value, int decimals)
|
||||
{
|
||||
if(value == 0)
|
||||
return "0";
|
||||
return Math.Round(value, decimals).ToString();
|
||||
}
|
||||
|
||||
public static string RoundToString(this float value, int decimals)
|
||||
{
|
||||
return ((double)value).RoundToString(decimals);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 区域与语言
|
||||
|
||||
#if false
|
||||
|
||||
Reference in New Issue
Block a user