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


C# Transform.BroadcastMessage方法代码示例

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


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

示例1: SendSignal

 public static void SendSignal(Transform recipient, string messageWhenTriggered, string messageArgument)
 {
     if(string.IsNullOrEmpty(messageArgument))
     {
         recipient.BroadcastMessage(messageWhenTriggered, messageArgument);
     }
     else
     {
         recipient.BroadcastMessage(messageWhenTriggered);
     }
 }
开发者ID:nihilocrat,项目名称:ggj2014_omen,代码行数:11,代码来源:SignalSender.cs

示例2: InitializeInstance

		private void InitializeInstance (Transform instance)
		{
				if (_parentInstances) {
						instance.parent = transform;
				}

				instance.gameObject.SetActive (true);
				instance.BroadcastMessage ("OnPoolCreate", this, SendMessageOptions.DontRequireReceiver);
		}
开发者ID:vkphillia,项目名称:Route417c,代码行数:9,代码来源:GameObjectPool.cs

示例3: Despawn

 // Despawn effect or audio and send OnDespawned message
 public void Despawn(Transform obj)
 {
     obj.BroadcastMessage("OnDespawned", SendMessageOptions.DontRequireReceiver);
     obj.gameObject.SetActive(false);
 }
开发者ID:mattlazarte,项目名称:AscentUnityProject,代码行数:6,代码来源:F3DPool.cs

示例4: touchDown

 void touchDown(Transform touchTarget, Vector3 touchPosition)
 {
     if (!touchTarget) return;
     lastTouchDownPos = touchPosition;
     touchTarget.BroadcastMessage("touchDown", new TouchDownEvent(touchTarget, touchPosition), SendMessageOptions.DontRequireReceiver);
 }
开发者ID:Diggery,项目名称:SuperSneak,代码行数:6,代码来源:TouchManager.cs

示例5: touchUp

 public void touchUp(Transform touchTarget, Transform startTarget, Vector2 touchPosition, Vector2 touchDirection, float touchTime)
 {
     if (!startTarget) return;
     startTarget.BroadcastMessage("touchUp", new TouchUpEvent(touchTarget, startTarget, touchPosition, touchDirection, touchTime), SendMessageOptions.DontRequireReceiver);
 }
开发者ID:Diggery,项目名称:SuperSneak,代码行数:5,代码来源:TouchManager.cs

示例6: touchDrag

 public void touchDrag(Vector2 touchDelta, Vector2 touchDistance, Vector2 touchPosition, Transform touchTarget, Transform startTarget)
 {
     if (!startTarget) return;
     startTarget.BroadcastMessage("drag", new TouchDragEvent(touchDelta, touchDistance, touchPosition, touchTarget, startTarget), SendMessageOptions.DontRequireReceiver);
 }
开发者ID:Diggery,项目名称:SuperSneak,代码行数:5,代码来源:TouchManager.cs

示例7: tap

 public void tap(Transform touchTarget, Vector2 touchPosition)
 {
     if (!touchTarget) return;
     touchTarget.BroadcastMessage("tap", new TapEvent(touchTarget, touchPosition), SendMessageOptions.DontRequireReceiver);
 }
开发者ID:Diggery,项目名称:SuperSneak,代码行数:5,代码来源:TouchManager.cs

示例8: ReleaseInstance

 public void ReleaseInstance(Transform instance)
 {
     instance.BroadcastMessage("OnPoolRelease", this, SendMessageOptions.DontRequireReceiver);
     instance.gameObject.SetActive(false);
     _instances.Push(instance);
 }
开发者ID:ChrisMaire,项目名称:BigDogs,代码行数:6,代码来源:GameObjectPool.cs


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