public void ResumeRoleAnim() { Animator[] allAnim = GetMainPlayer().GetComponentsInChildren <Animator>(); foreach (Animator anim in allAnim) { anim.speed = 1; } FightPetMgr fightPetMgr = GetMainPlayerComp().GetFightPetMgr(); GameObject petGo = fightPetMgr.GetCurPet(); if (petGo != null) { Animator[] allAnimPet = petGo.GetComponentsInChildren <Animator>(); foreach (Animator anim in allAnim) { anim.speed = 1; } } petGo = fightPetMgr.GetSecondCurPet(); if (petGo != null) { Animator[] allAnimPet = petGo.GetComponentsInChildren <Animator>(); foreach (Animator anim in allAnim) { anim.speed = 1; } } }
private void Start() { m_WaveMgr = Global.gApp.CurScene.GetWaveMgr(); m_DamageRange = transform.Find("ModelNode/Damage").gameObject; m_Rigidbody2D = GetComponent <Rigidbody2D>(); m_CircleCollider2D = GetComponent <CircleCollider2D>(); m_BackAct = GetComponent <BeatBackAct>(); m_BackAct.Init(this, m_Weight); m_Carrier = new CarrieMgr(this); m_WeaponMgr = new FightWeaponMgr(this); m_PetMgr = new FightPetMgr(this); m_BuffMgr = new BuffMgr(this); m_PlayerData = new PlayerData(this, m_BuffMgr); m_PlayerData.Init(); m_Fight = new Fight(this); m_Fight.SetRotateNode(RoleNode); m_WeaponMgr.InitGun(); //int skillLevel = Global.gApp.gSystemMgr.GetSkillMgr().GetSkillLevel(GameConstVal.SExSpeed); //Skill_dataItem skillLevelData = Global.gApp.gGameData.SkillDataConfig.Get(skillLevel); //float addParam = (skillLevelData == null) ? 1f : skillLevelData.skill_exspeed[0]; float addParam = 1.0f + 0.2f * (m_WeaponMgr.GetCombatAttrValue(CombatAttr.CombatAttrType.MoveSpeed) / (m_WeaponMgr.GetCombatAttrValue(CombatAttr.CombatAttrType.MoveSpeed) + 5.0f * PlayerDataMgr.singleton.GetPlayerLevel() + 1.0f)); m_Speed *= addParam; Debug.Log("m_Speed " + m_Speed); m_GoldRate = 1.0f + m_WeaponMgr.GetCombatAttrValue(Game.CombatAttr.CombatAttrType.Gold_Add); Debug.Log("m_GoldRate " + m_GoldRate); //m_EnableVIT = (Global.gApp.CurScene.GetPassData().enableVIT != 0); //if (m_EnableVIT) //{ // m_BuffMgr.AddBuff(BuffType.PlayerEnergy, 10, 10); //} m_InNormalScene = Global.gApp.CurScene.IsNormalPass(); if (m_InNormalScene) { m_WeaponMgr.SetCurMainWeaponEnabled(false); //m_PetMgr.ChangePet(Global.gApp.gSystemMgr.GetWeaponMgr().GetCurPet()); } //if (m_InitCar != null) //{ // GameObject CarNode = Global.gApp.gResMgr.InstantiateObj(m_InitCar); // SetCarrier(CarNode, 999999999, 6); //} SetSafe(true, false); //m_Damage = 25 * (1 + 0.25f) ^ (怪攻击等级 - 1); MonsterDamage = Mathf.Ceil(25 * Mathf.Pow((1 + 0.25f), (PlayerDataMgr.singleton.StageAtkLevel - 1))); Global.gApp.gMsgDispatcher.Broadcast <int, Transform>(MsgIds.AddPlayerHpUi, 0, HPNode); }