当前位置: 首页>>代码示例>>C#>>正文


C# ParameterSet.GetVector3方法代码示例

本文整理汇总了C#中ParameterSet.GetVector3方法的典型用法代码示例。如果您正苦于以下问题:C# ParameterSet.GetVector3方法的具体用法?C# ParameterSet.GetVector3怎么用?C# ParameterSet.GetVector3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ParameterSet的用法示例。


在下文中一共展示了ParameterSet.GetVector3方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ParseParmSet

 public static new void ParseParmSet(ref ParameterSet actorParm, ref ParameterSet worldParm)
 {
     if (worldParm.HasParm("Strength"))
         actorParm.AddParm("Strength", worldParm.GetFloat("Strength"));
     if (worldParm.HasParm("Direction"))
         actorParm.AddParm("Direction", worldParm.GetVector3("Direction"));
 }
开发者ID:scotttorgeson,项目名称:HeroesOfRock,代码行数:7,代码来源:AirBurstTriggerVolume.cs

示例2: ParseParmSet

        public static new void ParseParmSet(ref ParameterSet actorParm, ref ParameterSet worldParm)
        {
            System.Diagnostics.Debug.Assert(worldParm.HasParm("NewDir"), "Rotate Camera requires a new direction!");
            actorParm.AddParm("NewDir", worldParm.GetVector3("NewDir"));

            if (worldParm.HasParm("RotateRight"))
                actorParm.AddParm("RotateRight", worldParm.GetBool("RotateRight"));
            if(worldParm.HasParm("RotationTime"))
                actorParm.AddParm("RotationTime", worldParm.GetFloat("RotationTime"));
        }
开发者ID:scotttorgeson,项目名称:HeroesOfRock,代码行数:10,代码来源:RotateCameraTriggerVolume.cs

示例3: PostLoadInit

        public override void PostLoadInit(ParameterSet Parm)
        {
            int index = 0;

            while (Parm.HasParm("Light" + index))
            {
                string keyString = "Light" + index;
                string lightType = Parm.GetString(keyString);

                switch (lightType)
                {
                    case "Directional":
                        {
                            // read directional light parameters and create light
                            Vector3 direction = Parm.GetVector3(keyString + "Direction");
                            Vector4 color = Parm.GetVector4(keyString + "Color");
                            float intensity = Parm.GetFloat(keyString + "Intensity");
                            directionalLights.Add(new DirectionalLight(direction, color, intensity));
                        }
                        break;
                    case "Spot":
                        {
                            Vector3 position = Parm.GetVector3(keyString + "Position");
                            Vector3 direction = Parm.GetVector3(keyString + "Direction");
                            Vector4 color = Parm.GetVector4(keyString + "Color");
                            float intensity = Parm.GetFloat(keyString + "Intensity");
                            spotLights.Add(new SpotLight(DeferredRenderer.Instance.GraphicsDevice, position, direction, color, intensity, true, 1024, spotCookie));
                        }
                        break;
                    case "Point":
                        {
                            Vector3 position = Parm.GetVector3(keyString + "Position");
                            float radius = Parm.GetFloat(keyString + "Radius");
                            Vector4 color = Parm.GetVector4(keyString + "Color");
                            float intensity = Parm.GetFloat(keyString + "Intensity");
                            pointLights.Add(new PointLight(DeferredRenderer.Instance.GraphicsDevice, position, radius, color, intensity, true, 256));
                        }
                        break;
                }
                index++;
            }
        }
开发者ID:scotttorgeson,项目名称:HeroesOfRock,代码行数:42,代码来源:LightManager.cs


注:本文中的ParameterSet.GetVector3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。