Example #1
0
		void updateMotion() {
			CurTime = Time.realtimeSinceStartup;
			float deltaTime = (float) ( CurTime - LastTime );
			mTimeElipsed += deltaTime * 1.00f;

			var actClip = m_clipState[ m_motionSelect ].motion as AnimationClip;
			if( actClip == null ) return;

			var st = self.GetCurrentAnimatorStateInfo( 0 );
			m_framePos += ( deltaTime * actClip.frameRate ); // ノーマライズ単位のdeltaTimeを足す
			if( actClip.toRealTime() < m_framePos ) {
				m_framePos = 0.00f;
			}
			LastTime = CurTime;

			self.Play( m_clipState[ m_motionSelect ].name, 0, m_framePos / actClip.toRealTime() );
			self.Update( 0 );

			//Debug.Log( "__Update: " );
			SceneView.RepaintAll();
			EditorHelper.ForceReloadInspectors();
		}