//初始化主角 void InitCharactor(GameObject go) { if (null == go) { return; } RoleModel = go.transform; RoleModel.parent = CacheModel; RoleModel.localScale = Vector3.one; RoleModel.localPosition = Vector3.zero; RoleModel.localRotation = Quaternion.identity; ArpgAnimatContorller.Init(RoleModel); GameMgr.Instance.CameraController.SetTarget(CacheModel); }
//初始化主角 void InitCharactor(GameObject go) { if (null == go) { return; } //if(!go.activeSelf) //{ // go.SetActive(true); //} RoleModel = go.transform; RoleModel.parent = CacheModel; RoleModel.localScale = Vector3.one; RoleModel.localPosition = Vector3.zero; RoleModel.localRotation = Quaternion.identity; ArpgAnimatContorller = CacheModel.GetComponent <ARPGAnimatorController>(); ArpgAnimatContorller.Init(RoleModel); }