public PlayerData(Player player, BuffMgr buffMgr) { m_HeroNode = player.transform.Find("ModelNode/hero"); m_FightScene = Global.gApp.CurScene as FightScene; m_GainGold = 0; m_Player = player; m_BuffMgr = buffMgr; //int skillLevel = Global.gApp.gSystemMgr.GetSkillMgr().GetSkillLevel(GameConstVal.SExGold); //Skill_dataItem skillLevelData = Global.gApp.gGameData.SkillDataConfig.Get(skillLevel); //float skillParam = (skillLevelData == null) ? 1f : skillLevelData.skill_exgold[0]; //float skillParam = 1.0f + m_Player.GetWeaponMgr().GetCombatAttrValue(Game.CombatAttr.CombatAttrType.Gold_Add); //PassItem passData = Global.gApp.CurScene.GetPassData(); //if ((PassType)passData.passType == PassType.MainPass) //{ // m_GoldRate = passData.goldParam * skillParam; // Debug.Log("m_GoldRate " + m_GoldRate); //} //else //{ // int roleLv = Global.gApp.gSystemMgr.GetBaseAttrMgr().GetLevel(); // PassSpecial_dataItem passSpecial = Global.gApp.gGameData.PassSpecialCfg.Get(roleLv); // m_GoldRate = passSpecial.coinparam * skillParam; //} }
public ShieldBuff(Player player, BuffMgr buffMgr, float duration, int buffId, GameObject particlePrefab = null) { Init(player, buffMgr, duration, buffId); if (particlePrefab != null) { CreateParticle(particlePrefab); } }
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); }
public virtual void Init(Player player, BuffMgr buffMgr, float duration, int buffId, float val, float va2 = 0, float val3 = 0) { m_Val = val; m_Val2 = va2; m_Val3 = val3; m_BuffId = buffId; m_BuffMgr = buffMgr; m_Player = player; m_Duration = duration; m_CurTime = 0; }
public MoveSpeedXBuff(Player player, BuffMgr buffMgr, float duration, int buffId, float val) { Init(player, buffMgr, duration, buffId, val); }
public FireCountTimesBuff(Player player, BuffMgr buffMgr, float duration, int buffId, float val) { Init(player, buffMgr, duration, buffId, val); }
public FireCurveInc(Player player, BuffMgr buffMgr, float duration, int buffId, float val) { Init(player, buffMgr, duration, buffId, val); }
public NaNoboostBuff(Player player, BuffMgr buffMgr, float duration, int buffId, float val, float val2, float val3, GameObject particlePrefab) { Init(player, buffMgr, duration, buffId, val, val2, val3); CreateParticle(particlePrefab); }
public virtual void Init(Player player, BuffMgr buffMgr, float duration, int buffId) { Init(player, buffMgr, duration, buffId, 0); }
public PlayerEnergy(Player player, BuffMgr buffMgr, float duration, int buffId, float val) { Init(player, buffMgr, duration, buffId, val); SetVal(100); }