private IEnumerator <IYieldInstruction> Play(HumanRenderer humanRenderer) { NextFrameWait wait = new NextFrameWait(); float startTime = Time.time; for (int i = 0; i < frames.Length; i++) { frames[i].ApplyToSkeleton(humanRenderer.skeleton); wait.neededTime = startTime + frames[i].timeStartPercent * timeLength; yield return(wait); } }
public HumanSkeleton(HumanRenderer humanRenderer) { bones = new HumanBone[] { new HumanBone("Root", humanRenderer.root), new HumanBone("Body", humanRenderer.bodyBone), new HumanBone("Head", humanRenderer.headBone), new HumanBone("Neck", humanRenderer.neckBone), new HumanBone("HandL", humanRenderer.handLBone), new HumanBone("HandR", humanRenderer.handRBone), new HumanBone("LegL", humanRenderer.legLBone), new HumanBone("LegR", humanRenderer.legRBone), new HumanBone("KneeL", humanRenderer.kneeLBone), new HumanBone("ElbowL", humanRenderer.elbowLBone), new HumanBone("ElbowR", humanRenderer.elbowRBone), new HumanBone("KneeR", humanRenderer.kneeRBone) }; }