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


C# PlaygroundParticlesC.GetComponent方法代码示例

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


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

示例1: SetInitialTargetPosition

 // Initial target position
 public static void SetInitialTargetPosition(PlaygroundParticlesC playgroundParticles, Vector3 position, bool refreshParticleSystem)
 {
     for (int p = 0; p<playgroundParticles.particleCache.Length; p++) {
         playgroundParticles.playgroundCache.previousTargetPosition[p] = position;
         playgroundParticles.playgroundCache.targetPosition[p] = position;
         playgroundParticles.particleCache[p].size = 0;
         playgroundParticles.playgroundCache.position[p] = position;
     }
     if (refreshParticleSystem)
         playgroundParticles.GetComponent<ParticleSystem>().SetParticles(playgroundParticles.particleCache, playgroundParticles.particleCache.Length);
 }
开发者ID:PawkaHub,项目名称:Lore-Unity,代码行数:12,代码来源:PlaygroundParticlesC.cs

示例2: SetInitialTargetPosition

		// Initial target position
		public static void SetInitialTargetPosition (PlaygroundParticlesC playgroundParticles, Vector3 position, bool refreshParticleSystem) {
			for (int p = 0; p<playgroundParticles.particleCache.Length; p++) {
				playgroundParticles.playgroundCache.previousTargetPosition[p] = position;
				playgroundParticles.playgroundCache.targetPosition[p] = position;
#if UNITY_4_3 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2
				playgroundParticles.particleCache[p].size = 0;
#else
				playgroundParticles.particleCache[p].startSize = 0;
#endif
				playgroundParticles.particleCache[p].position = position;
				playgroundParticles.playgroundCache.position[p] = position;
				playgroundParticles.playgroundCache.collisionParticlePosition[p] = position;
			}
			if (refreshParticleSystem)
				playgroundParticles.GetComponent<ParticleSystem>().SetParticles(playgroundParticles.particleCache, playgroundParticles.particleCache.Length);
		}
开发者ID:GroupByStudios,项目名称:TDS_Gauss,代码行数:17,代码来源:PlaygroundParticlesC.cs


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