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


C# ParticlePlayground.PlaygroundParticlesC类代码示例

本文整理汇总了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;
			}
		}
开发者ID:sirgreensock,项目名称:FishTest,代码行数:11,代码来源:SwitchMultithreading.cs

示例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>();
		}
	}
开发者ID:AcessDeniedAD,项目名称:bbqgj2015,代码行数:16,代码来源:chief.cs

示例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;
		}
开发者ID:sirgreensock,项目名称:FishTest,代码行数:24,代码来源:RecordedFrame.cs

示例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);
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:8,代码来源:PlaygroundC.cs

示例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();
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:8,代码来源:PlaygroundC.cs

示例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);
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:9,代码来源:PlaygroundC.cs

示例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);
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:8,代码来源:PlaygroundC.cs

示例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);
			}
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:16,代码来源:PlaygroundC.cs

示例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;
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:13,代码来源:PlaygroundC.cs

示例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);
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:8,代码来源:PlaygroundC.cs

示例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;
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:12,代码来源:PlaygroundC.cs

示例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);
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:13,代码来源:PlaygroundC.cs

示例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;
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:13,代码来源:PlaygroundC.cs

示例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;
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:19,代码来源:PlaygroundC.cs

示例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);
		}
开发者ID:nermakov777,项目名称:Unity_Tests,代码行数:8,代码来源:PlaygroundC.cs


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