本文整理匯總了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"))