本文整理汇总了C#中System.ConfigNode.GetFloat方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigNode.GetFloat方法的具体用法?C# ConfigNode.GetFloat怎么用?C# ConfigNode.GetFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ConfigNode
的用法示例。
在下文中一共展示了ConfigNode.GetFloat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MonitorPage
//.........这里部分代码省略.........
{
MonoBehaviour handlerModule;
HandlerSupportMethods supportMethods;
MethodInfo handlerMethod = InstantiateHandler(handlerNode, ourMonitor, out handlerModule, out supportMethods);
if (handlerMethod != null && handlerModule != null)
{
try
{
backgroundHandlerMethod = (Func<RenderTexture, float, bool>)Delegate.CreateDelegate(typeof(Func<RenderTexture, float, bool>), handlerModule, handlerMethod);
}
catch
{
JUtil.LogErrorMessage(ourMonitor, "Incorrect signature for the background handler method {0}", handlerModule.name);
break;
}
backgroundHandlerS = supportMethods;
isMutable = true;
showNoSignal = node.HasValue("showNoSignal");
background = BackgroundType.Handler;
backgroundHandlerModule = handlerModule;
break;
}
}
if (background == BackgroundType.None)
{
if (node.HasValue("cameraTransform"))
{
isMutable = true;
background = BackgroundType.Camera;
camera = node.GetValue("cameraTransform");
cameraFOV = defaultFOV;
cameraFlickerChance = node.GetFloat("flickerChance") ?? 0;
cameraFlickerRange = node.GetInt("flickerRange") ?? 0;
if (node.HasValue("fov"))
{
float fov;
cameraFOV = float.TryParse(node.GetValue("fov"), out fov) ? fov : defaultFOV;
}
else if (node.HasValue("zoomFov") && node.HasValue("zoomButtons"))
{
Vector3 zoomFov = ConfigNode.ParseVector3(node.GetValue("zoomFov"));
Vector2 zoomButtons = ConfigNode.ParseVector2(node.GetValue("zoomButtons"));
if ((int)zoomFov.z != 0 && ((int)zoomButtons.x != (int)zoomButtons.y))
{
maxFOV = Math.Max(zoomFov.x, zoomFov.y);
minFOV = Math.Min(zoomFov.x, zoomFov.y);
zoomSteps = (int)zoomFov.z;
zoomUpButton = (int)zoomButtons.x;
zoomDownButton = (int)zoomButtons.y;
zoomSkip = (maxFOV - minFOV) / zoomSteps;
currentZoom = 0;
cameraFOV = maxFOV;
}
else
{
JUtil.LogMessage(ourMonitor, "Ignored invalid camera zoom settings on page {0}.", pageNumber);
}
}
}
}
if (background == BackgroundType.None)
{
if (node.HasValue("textureURL"))