public void CreateBones(string boneName) { mBody = FEngineManager.Create(boneName, this.gameObject); mBones = mBody.GetComponentsInChildren <Transform>(true); FEngineManager.AddComponent <SkinnedMeshRenderer>(mBody); mBodyAnimator = FEngineManager.AddComponent <FCAnimator>(mBody); Init(); }
public override void Init() { if (mBodyAnimator == null) { mBodyAnimator = this.GetComponent <FCAnimator>(); mBodyAnimator = mBodyAnimator == null?this.GetComponentInChildren <FCAnimator>() : mBodyAnimator; } if (mBodyAnimator != null) { mBodyAnimator.Init(); } }