本文整理汇总了C#中ParticlePlayground.PlaygroundParticlesC类的典型用法代码示例。如果您正苦于以下问题:C# PlaygroundParticlesC类的具体用法?C# PlaygroundParticlesC怎么用?C# PlaygroundParticlesC使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlaygroundParticlesC类属于ParticlePlayground命名空间,在下文中一共展示了PlaygroundParticlesC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NextIndividualParticleSystemMethod
/// <summary>
/// Sets the next thread method for an individual particle system.
/// </summary>
/// <param name="p">Particle Playground system.</param>
public static void NextIndividualParticleSystemMethod (PlaygroundParticlesC p) {
switch (p.threadMethod) {
case ThreadMethodLocal.Inherit: p.threadMethod = ThreadMethodLocal.OnePerSystem; break;
case ThreadMethodLocal.OnePerSystem: p.threadMethod = ThreadMethodLocal.OneForAll; break;
case ThreadMethodLocal.OneForAll: p.threadMethod = ThreadMethodLocal.Inherit; break;
}
}
示例2: Start
// Use this for initialization
void Start () {
_maxFireGun = 0;
gunUse = true;
firgunSize = 0;
b = transform.FindChild("Playground Manager").FindChild ("Playground Fire").GetComponent<BoxCollider>();
b.enabled = false;
fireScrpit = this.transform.FindChild ("Playground Manager").transform.FindChild ("Playground Fire").GetComponent<ParticlePlayground.PlaygroundParticlesC> ();
fireScrpit.emit = false;
if (this.gameObject.tag == "playerChief")
{
//monAnim = transform.FindChild("ChiefPasTouché").GetComponent<Animator>();
}
}
示例3: RecordedFrame
public RecordedFrame (PlaygroundParticlesC playgroundParticles, float keyframeInterval) {
particles = new PlaybackParticle[playgroundParticles.particleCache.Length];
for (int i = 0; i<particles.Length; i++)
{
particles[i] = new PlaybackParticle(
playgroundParticles.playgroundCache.position[i],
playgroundParticles.playgroundCache.velocity[i],
playgroundParticles.playgroundCache.rotation[i],
playgroundParticles.playgroundCache.size[i],
playgroundParticles.particleCache[i].lifetime,
playgroundParticles.particleCache[i].startLifetime,
playgroundParticles.playgroundCache.life[i],
playgroundParticles.playgroundCache.birth[i],
playgroundParticles.playgroundCache.death[i],
playgroundParticles.playgroundCache.lifetimeSubtraction[i],
playgroundParticles.playgroundCache.color[i],
playgroundParticles.playgroundCache.targetPosition[i],
playgroundParticles.playgroundCache.initialSize[i]
);
}
timeStamp = Time.realtimeSinceStartup;
this.keyframeInterval = keyframeInterval;
}
示例4: SetInitialTargetPosition
/// <summary>
/// Sets initial target position for this Particle System.
/// </summary>
/// <param name="playgroundParticles">Playground particles.</param>
/// <param name="position">Position.</param>
public static void SetInitialTargetPosition (PlaygroundParticlesC playgroundParticles, Vector3 position) {
PlaygroundParticlesC.SetInitialTargetPosition(playgroundParticles,position, true);
}
示例5: ClearPaint
/// <summary>
/// Clears out paint in a PlaygroundParticlesC object.
/// </summary>
/// <param name="playgroundParticles">Playground particles.</param>
public static void ClearPaint (PlaygroundParticlesC playgroundParticles) {
if (playgroundParticles.paint!=null)
playgroundParticles.paint.ClearPaint();
}
示例6: Erase
/// <summary>
/// Live erases into a PlaygroundParticlesC PaintObject's positions, returns true if position was erased.
/// </summary>
/// <param name="playgroundParticles">Playground particles.</param>
/// <param name="position">Position.</param>
/// <param name="radius">Radius.</param>
public static bool Erase (PlaygroundParticlesC playgroundParticles, Vector3 position, float radius) {
return playgroundParticles.paint.Erase(position,radius);
}
示例7: PaintObject
/// <summary>
/// Creates a paint object reference.
/// </summary>
/// <returns>The object.</returns>
/// <param name="playgroundParticles">Playground particles.</param>
public static PaintObjectC PaintObject (PlaygroundParticlesC playgroundParticles) {
return PlaygroundParticlesC.NewPaintObject(playgroundParticles);
}
示例8: RemoveEvent
/// <summary>
/// Removes the event.
/// </summary>
/// <param name="i">The index.</param>
/// <param name="playgroundParticles">Playground particles.</param>
public static void RemoveEvent (int i, PlaygroundParticlesC playgroundParticles) {
i = i%playgroundParticles.events.Count;
if (playgroundParticles.events.Count>0 && playgroundParticles.events[i]!=null) {
if (playgroundParticles.events[i].target!=null) {
for (int x = 0; x<playgroundParticles.events[i].target.eventControlledBy.Count; x++)
if (playgroundParticles.events[i].target.eventControlledBy[x]==playgroundParticles)
playgroundParticles.events[i].target.eventControlledBy.RemoveAt(x);
}
playgroundParticles.events.RemoveAt (i);
}
}
示例9: CreateEvent
/// <summary>
/// Creates an event into passed particle system.
/// </summary>
/// <returns>The event.</returns>
/// <param name="playgroundParticles">Particle Playground system.</param>
public static PlaygroundEventC CreateEvent (PlaygroundParticlesC playgroundParticles) {
if (playgroundParticles==null) return null;
PlaygroundEventC playgroundEvent = new PlaygroundEventC();
if (playgroundParticles.events==null)
playgroundParticles.events = new List<PlaygroundEventC>();
playgroundParticles.events.Add (playgroundEvent);
return playgroundEvent;
}
示例10: SetParticleCount
/// <summary>
/// Sets amount of particles for this Particle System.
/// </summary>
/// <param name="playgroundParticles">Playground particles.</param>
/// <param name="amount">Amount.</param>
public static void SetParticleCount (PlaygroundParticlesC playgroundParticles, int amount) {
PlaygroundParticlesC.SetParticleCount(playgroundParticles,amount);
}
示例11: AddCollider
/// <summary>
/// Adds a plane collider and assign a transform.
/// </summary>
/// <returns>The PlaygroundColliderC.</returns>
/// <param name="playgroundParticles">Playground particles.</param>
/// <param name="transform">Transform.</param>
public static PlaygroundColliderC AddCollider (PlaygroundParticlesC playgroundParticles, Transform transform) {
PlaygroundColliderC pCollider = new PlaygroundColliderC();
pCollider.transform = transform;
playgroundParticles.colliders.Add(pCollider);
return pCollider;
}
示例12: Add
/// <summary>
/// Adds a single state mesh with texture and transform.
/// </summary>
/// <param name="playgroundParticles">Playground particles.</param>
/// <param name="mesh">Mesh.</param>
/// <param name="texture">Texture.</param>
/// <param name="scale">Scale.</param>
/// <param name="offset">Offset.</param>
/// <param name="stateName">State name.</param>
/// <param name="stateTransform">State transform.</param>
public static void Add (PlaygroundParticlesC playgroundParticles, Mesh mesh, Texture2D texture, float scale, Vector3 offset, string stateName, Transform stateTransform) {
MeshParticles.Add(playgroundParticles,mesh,texture,scale,offset,stateName,stateTransform);
}
示例13: CreatePlaygroundTransform
public static Transform CreatePlaygroundTransform (PlaygroundParticlesC playgroundParticles) {
Transform newTransform = CreateTransform();
PlaygroundTransformC newPlaygroundTransform = new PlaygroundTransformC();
newPlaygroundTransform.transform = newTransform;
if (playgroundParticles.sourceTransforms.Count==1 && playgroundParticles.sourceTransforms[0].transform==null)
playgroundParticles.sourceTransforms[0].transform = newTransform;
else
playgroundParticles.sourceTransforms.Add (newPlaygroundTransform);
newTransform.parent = playgroundParticles.particleSystemTransform;
newTransform.localPosition = Vector3.zero;
newTransform.name += " "+playgroundParticles.sourceTransforms.Count.ToString();
return newTransform;
}
示例14: CreateSpline
/// <summary>
/// Creates a new Playground Spline. The spline will be attached to a new GameObject in your scene by the name "Playground Spline" which is parented to the passed in Particle Playground system.
/// The Particle Playground system will have the source spline automatically set.
/// </summary>
/// <returns>The Playground Spline component on the created GameObject.</returns>
/// <param name="playgroundParticles">Particle Playground system.</param>
public static PlaygroundSpline CreateSpline (PlaygroundParticlesC playgroundParticles) {
PlaygroundSpline spline = CreateSpline();
spline.Reset();
if (playgroundParticles.splines.Count==1 && playgroundParticles.splines[0]==null)
playgroundParticles.splines[0] = spline;
else
playgroundParticles.splines.Add (spline);
spline.transform.parent = playgroundParticles.particleSystemTransform;
spline.transform.localPosition = Vector3.zero;
spline.name += " "+playgroundParticles.splines.Count.ToString();
spline.AddUser(playgroundParticles.particleSystemTransform);
return spline;
}
示例15: SetLifetime
/// <summary>
/// Sets lifetime for this Particle System.
/// </summary>
/// <param name="playgroundParticles">Playground particles.</param>
/// <param name="time">Time.</param>
public static void SetLifetime (PlaygroundParticlesC playgroundParticles, float time) {
PlaygroundParticlesC.SetLifetime(playgroundParticles,playgroundParticles.sorting,time);
}