Update() private method

private Update ( float deltaTime ) : void
deltaTime float
return void
コード例 #1
0
 virtual protected void AniUpdate()
 {
     if (!CanPlay)
     {
         SetEnable(false);
         return;
     }
     mAnimator.Update(UnScaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
     if (IsDone)
     {
         GoToEnd();
     }
 }
コード例 #2
0
        void UpdateAnimation(GameObject go)
        {
            animtionDeltaTime = (float)EditorApplication.timeSinceStartup - lastAnimationTime;
            animationTime    += animtionDeltaTime;
            lastAnimationTime = (float)EditorApplication.timeSinceStartup;

            if (go)
            {
                var anim = go.GetComponent <Animation>();
                if (anim)
                {
                    if (!anim.isPlaying)
                    {
                        anim.Play();
                    }
                    if (animationTime > anim.clip.length)
                    {
                        animationTime = 0;
                    }

                    if (!AnimationMode.InAnimationMode())
                    {
                        AnimationMode.StartAnimationMode();
                    }
                    AnimationMode.SampleAnimationClip(skeleton, anim.clip, animationTime);
                    //AnimationMode.StopAnimationMode();
                }
                else
                {
                    Animator animator = go.GetComponent <Animator>();
                    if (animator)
                    {
                        animator.Update(animtionDeltaTime);
                    }
                }
            }
        }
コード例 #3
0
ファイル: UMAGeneratorBase.cs プロジェクト: NotYours180/UMA
			public void RestoreAnimatorState(Animator animator)
			{
				animator.applyRootMotion = applyRootMotion;
				animator.updateMode = updateMode;
				animator.cullingMode = cullingMode;

				if (animator.layerCount == stateHashes.Length)
				{
					for (int i = 0; i < animator.layerCount; i++)
					{
						animator.Play(stateHashes[i], i, stateTimes[i]);
					}
				}
				
				animator.Update(0.00001f);
				animator.enabled = animating;
			}