本文整理汇总了C#中ConfigFile.GetKey_Vector3方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigFile.GetKey_Vector3方法的具体用法?C# ConfigFile.GetKey_Vector3怎么用?C# ConfigFile.GetKey_Vector3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigFile
的用法示例。
在下文中一共展示了ConfigFile.GetKey_Vector3方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContrail
// Load a contrail based on the current group name
private BaseShip_Contrail LoadContrail(ConfigFile Info, String GroupName)
{
// Ignore if not contrail
if(GroupName.ToLower().StartsWith("contrail") == false)
return null;
// Alloc a new contrail
BaseShip_Contrail Contrail = new BaseShip_Contrail();
// Get color, width, and ship position
Vector3 ContrailColor = Info.GetKey_Vector3(GroupName, "Color");
float ContrailWidth = Info.GetKey_Float(GroupName, "Width");
Contrail.ContrailShipPos = Info.GetKey_Vector2(GroupName, "Pos");
// Initialize the contrail objects
Contrail.ContrailObject = new GameObject("Contrail");
Contrail.Contrail = Contrail.ContrailObject.AddComponent("LineRenderer") as LineRenderer;
Contrail.Contrail.material = new Material(Shader.Find("Particles/Additive"));//("Particles/Additive"));
Contrail.Contrail.SetColors(new Color(ContrailColor.x, ContrailColor.y, ContrailColor.z), Color.clear);
Contrail.Contrail.SetWidth(ContrailWidth, 2.0f);
Contrail.Contrail.SetVertexCount(BaseShip_Contrail.ContrailLength - 1); // -1 since we are lerp-ing
Contrail.ContrailPoints = new Vector2[BaseShip_Contrail.ContrailLength];
Contrail.ContrailTime = 0.0f;
// Reset trail
SetPos(ShipPosition);
// All done!
return Contrail;
}