本文整理汇总了C#中Effect.setDirectionArray方法的典型用法代码示例。如果您正苦于以下问题:C# Effect.setDirectionArray方法的具体用法?C# Effect.setDirectionArray怎么用?C# Effect.setDirectionArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Effect
的用法示例。
在下文中一共展示了Effect.setDirectionArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: button14_Click
//.........这里部分代码省略.........
type = ParticleType.Triangle;
if (sType == "Square")
type = ParticleType.Square;
else if (sType == "Round")
type = ParticleType.Round;
else if (sType == "Skrillex")
type = ParticleType.Skrillex;
else if (sType == "Bass")
type = ParticleType.Bass;
}
else if (lezer.Name == "color")
color = Color.FromName(lezer.Value);
else if (lezer.Name == "color2")
{
color2enabled = true;
color2 = Color.FromName(lezer.Value);
}
else if (lezer.Name == "minSizeStarting")
minSizeStarting = float.Parse(lezer.Value);
else if (lezer.Name == "maxSizeStarting")
maxSizeStarting = float.Parse(lezer.Value);
else if (lezer.Name == "minSizeEnding")
minSizeEnding = float.Parse(lezer.Value);
else if (lezer.Name == "maxSizeEnding")
maxSizeEnding = float.Parse(lezer.Value);
else if (lezer.Name == "minLifetime")
minLifetime = Convert.ToInt16(lezer.Value);
else if (lezer.Name == "maxLifetime")
maxLifetime = Convert.ToInt16(lezer.Value);
else if (lezer.Name == "minForce")
minForce = Convert.ToInt16(lezer.Value);
else if (lezer.Name == "maxForce")
maxForce = Convert.ToInt16(lezer.Value);
else if (lezer.Name == "tickDelay")
tickDelay = Convert.ToInt16(lezer.Value);
else if (lezer.Name == "tickAmount")
{
tickAmount = Convert.ToInt16(lezer.Value);
//CreateParticleSystem(x, y, z, direction, directionOffset, type, color, minSizeStarting, maxSizeStarting, minSizeEnding, maxSizeEnding, minLifetime, maxLifetime, minForce, maxForce, tickDelay, tickAmount, particleSystemLifetime);
Effect ee = new Effect(startingPoint, particleSystemLifetime, directionOffset, minLifetime, maxLifetime, minForce, maxForce, tickDelay, tickAmount, x, y, z, minSizeStarting, maxSizeStarting, minSizeEnding, maxSizeEnding, color, direction, type);
if (color2enabled)
ee.setExtraColor(color2);
if (dirArr != null)
{
ee.setDirectionArray(dirArr);
}
PlaylistEffect.Add(ee);
}
}
else if (isCamera)
{
if (lezer.Name == "startingPoint")
startingPoint = Convert.ToInt64(lezer.Value);
else if (lezer.Name == "cameraStartPositionX")
cameraStartPositionX = float.Parse(lezer.Value);
else if (lezer.Name == "cameraStartPositionY")
cameraStartPositionY = float.Parse(lezer.Value);
else if (lezer.Name == "cameraStartPositionZ")
cameraStartPositionZ = float.Parse(lezer.Value);
else if (lezer.Name == "cameraEndPositionX")
cameraEndPositionX = float.Parse(lezer.Value);
else if (lezer.Name == "cameraEndPositionY")
cameraEndPositionY = float.Parse(lezer.Value);
else if (lezer.Name == "cameraEndPositionZ")
cameraEndPositionZ = float.Parse(lezer.Value);
else if (lezer.Name == "targetStartPositionX")
targetStartPositionX = float.Parse(lezer.Value);
else if (lezer.Name == "targetStartPositionY")
targetStartPositionY = float.Parse(lezer.Value);
else if (lezer.Name == "targetStartPositionZ")
targetStartPositionZ = float.Parse(lezer.Value);
else if (lezer.Name == "targetEndPositionX")
targetEndPositionX = float.Parse(lezer.Value);
else if (lezer.Name == "targetEndPositionY")
targetEndPositionY = float.Parse(lezer.Value);
else if (lezer.Name == "targetEndPositionZ")
targetEndPositionZ = float.Parse(lezer.Value);
else if (lezer.Name == "movementTime")
{
movementTime = Convert.ToInt64(lezer.Value);
PlaylistCamera.Add(new Camera(startingPoint, cameraStartPositionX, cameraStartPositionY, cameraStartPositionZ, cameraEndPositionX, cameraEndPositionY, cameraEndPositionZ, targetStartPositionX, targetStartPositionY, targetStartPositionZ, targetEndPositionX, targetEndPositionY, targetEndPositionZ, movementTime));
}
}
}
//Console.WriteLine(">");
break;
case XmlNodeType.Text: //De tekst in elk element weergeven.
//Console.WriteLine(lezer.Value);
break;
case XmlNodeType.EndElement: //Het einde van het element weergeven.
//Console.Write("</" + lezer.Name);
//Console.WriteLine(">");
break;
}
}
PlaySound(file);
this.Name = title;
sw2.Start();
tmrUpdateSystems.Start();
}