/// <summary> /// 初始化 /// </summary> public virtual void initRoleAniCtrl(FuBenCardCtrl _animCtrl, Mounts mounts, int vipLevel) { animCtrl = _animCtrl; activeAnimCtrl = animCtrl; if (mounts != null) { ResourcesManager.Instance.LoadAssetBundleTexture(mounts.getModelPath(), gameObject.transform, (obj) => { GameObject gameObj = obj as GameObject; if (mounts.getMountsSample().modelID == "miluDeer") { gameObj.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f); } else { gameObj.transform.localScale = new Vector3(1, 1, 1); } mountsAnimCtrl = gameObj.transform.FindChild("body").gameObject.GetComponent <FuBenCardCtrl> (); initMountsAniCtrl(mountsAnimCtrl); }); } else { animCtrl.gameObject.transform.localScale = new Vector3(1.2f, 1.2f, 1.2f); isCycling = false; setShadows(); } string angelPath = AngelSampleManager.Instance.get3DObjPath(vipLevel);//这个函数没判断守护天使是否激活!!!! if (PlayerPrefs.GetString(PlayerPrefsComm.ANGEL_USER_NAME + UserManager.Instance.self.uid) != "ok") { angelPath = ""; } if (angelPath != "") { ResourcesManager.Instance.LoadAssetBundleTexture(angelPath, gameObject.transform, (obj) => { GameObject gameObj = obj as GameObject; angelAnimCtrl = gameObj.transform.FindChild("body").gameObject.GetComponent <FuBenCardCtrl>(); initAngeAniCtrl(angelAnimCtrl); }); } }
/** 创建坐骑模型 */ private void createMountsModel(CallBack <GameObject> callback) { ResourcesManager.Instance.LoadAssetBundleTexture(mounts.getModelPath(), mount3dModel.transform, (obj) => { GameObject gameObj = obj as GameObject; Transform temp = gameObj.transform; if (mounts.sid == 130208) { temp.localScale = new Vector3(200, 200, 200); } else { temp.localScale = new Vector3(250, 250, 250); } temp.localPosition = Vector3.zero; temp.localRotation = new Quaternion(0, 0, 0, 1); if (callback != null) { callback(gameObj); } }); }