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


C# UnityEngine.Coroutine类代码示例

本文整理汇总了C#中UnityEngine.Coroutine的典型用法代码示例。如果您正苦于以下问题:C# Coroutine类的具体用法?C# Coroutine怎么用?C# Coroutine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Coroutine类属于UnityEngine命名空间,在下文中一共展示了Coroutine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Idle

 public Idle(Customer customer, float seconds = 5)
     : base(customer)
 {
     // Think about being idle
     customer.Think(supermarket.IdleIcon);
     delay = customer.StartCoroutine(Delay(seconds));
 }
开发者ID:Clarksj4,项目名称:Theme-Supermarket-Tycoon-World,代码行数:7,代码来源:Idle.cs

示例2: Move

 void Move(Vector3 newPos, float duration, float delay)
 {
     if (_moveCoroutine != null)
         StopCoroutine(_moveCoroutine);
 
     _moveCoroutine = StartCoroutine(MoveRoutine(newPos, duration, delay));
 }
开发者ID:millwardesque,项目名称:TrainDevChallenge,代码行数:7,代码来源:Door.cs

示例3: StartCompetitionMode

		public void StartCompetitionMode(float distance)
		{
			if(!competitionStarting)
			{
				competitionRoutine = StartCoroutine(DogfightCompetitionModeRoutine(distance/2));
			}
		}
开发者ID:tetryds,项目名称:BDArmory,代码行数:7,代码来源:BDACompetitionMode.cs

示例4: Start

 public void Start()
 {
     if(StartOnStart)
     {
         coroutine = StartCoroutine(DestroyOnDelay());
     }
 }
开发者ID:flatlineteam,项目名称:CartoonNetworkJam-Zer0,代码行数:7,代码来源:DestroyAfterTime.cs

示例5: UIShowHideController

 public UIShowHideController(GameObject go, Component panel)
 {
     this.panel = panel;
     this.animator = (go != null) ? go.GetComponent<Animator>() : null;
     if (animator == null && panel != null) animator = panel.GetComponent<Animator>();
     this.animCoroutine = null;
 }
开发者ID:tomasmed,项目名称:AmazonWarriors,代码行数:7,代码来源:UIShowHideController.cs

示例6: StartAutomaticRunCoroutine

 private void StartAutomaticRunCoroutine()
 {
     if (_automaticRunCoroutine == null)
     {
         _automaticRunCoroutine = StartCoroutine(AutomaticRunCoroutine());
     }
 }
开发者ID:nubick,项目名称:tween-peaks,代码行数:7,代码来源:FadeTweensView.cs

示例7: Explosion

        public override void Explosion()
        {
            if (null != mExplosionRoutine)
                return;

            mExplosionRoutine = StartCoroutine(internalExplosion());
        }
开发者ID:MasakiWang,项目名称:Team-Trainning-2015-08,代码行数:7,代码来源:Block.cs

示例8: CancelCurrentAnim

 private void CancelCurrentAnim()
 {
     if (animCoroutine != null) {
         DialogueManager.Instance.StopCoroutine(animCoroutine);
         animCoroutine = null;
     }
 }
开发者ID:tomasmed,项目名称:AmazonWarriors,代码行数:7,代码来源:UIShowHideController.cs

示例9: LookAt

        public void LookAt(Vector2 target)
        {
            if (lookAtCoroutine != null)
                StopCoroutine(lookAtCoroutine);

            lookAtCoroutine = StartCoroutine(_LookAtTarget(target));
        }
开发者ID:LuciusSixPercent,项目名称:Finsternis,代码行数:7,代码来源:MenuEyeController.cs

示例10: Create

		/// <summary>
		/// Creates a TrackedCoroutine attached to a new container object that will destroy itself when finished.
		/// </summary>
		/// <param name="routine">Coroutine to run; if arguments are needed, pass an anonymous wrapper</param>
		/// <param name="name">Name of the container object</param>
		/// <param name="parent">Parent of the container object</param>
		/// <returns>Created TrackedCoroutine instance</returns>
		public static TrackedCoroutine Create(Coroutine routine, string name = "TrackedCoroutine", GameObject parent = null)
		{
			var instance = GameObjectUtils.InstantiateNewSingle<TrackedCoroutine>(name, parent);
			instance.Routine = routine;
			instance.DestroyOnComplete = true;
			return instance;
		}
开发者ID:orbitalgames,项目名称:unity-utilities,代码行数:14,代码来源:TrackedCoroutine.cs

示例11: StartTimer

 public void StartTimer(float time)
 {
     timerRunning = true;
     timeRemaining = time;
     if(_timer != null)
         CoolDownManager.Instance.StopCoroutine(_timer);
     _timer = CoolDownManager.Instance.StartCoroutine(CoolDownTimer(time));
 }
开发者ID:gamezfordayz,项目名称:CodeNameKidsNextDoor,代码行数:8,代码来源:Timer.cs

示例12: StopAutomaticRunCoroutine

 private void StopAutomaticRunCoroutine()
 {
     if (_automaticRunCoroutine != null)
     {
         StopCoroutine(_automaticRunCoroutine);
         _automaticRunCoroutine = null;
     }
 }
开发者ID:nubick,项目名称:tween-peaks,代码行数:8,代码来源:FadeTweensView.cs

示例13: AddCoroutine

 public int AddCoroutine(IEnumerator coroutine, ECoroutineLevel level = ECoroutineLevel.High)
 {
     Coroutine cr = new Coroutine();
     cr.coroutine = coroutine;
     cr.crLevel = (int)level;
     mCoroutineDic[mIndex++] = cr;
     return mIndex;
 }
开发者ID:yuisunn,项目名称:UnityCrazy,代码行数:8,代码来源:Coroutiner.cs

示例14: BeginCounter

		public void BeginCounter()
		{
			if( m_CounterRoutine != null )
				return;

			Debug.Log( "Begin" );
			m_CounterRoutine = StartCoroutine( NotifyRoutine() );
		}
开发者ID:odbb,项目名称:ggj16,代码行数:8,代码来源:BalloonsApp.cs

示例15: OnStopCoroutine

 private void OnStopCoroutine()
 {
     if (coroutine != null)
     {
         GameLogic.Instance.StopCoroutine(coroutine);
     }
     coroutine = null;
 }
开发者ID:aeonphyxius,项目名称:unity_extensions,代码行数:8,代码来源:EnemyWaitAction.cs


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