public override void Init(BasePet pet, PetAtkState controller) { base.Init(pet, controller); m_AtkTimes = AtkTimes; ItemItem weaponItem = Global.gApp.gGameData.GetItemDataByName(GameConstVal.WDeadthWalker); GunsPass_dataItem weaponLevelData = Global.gApp.CurScene.GetGunPassDataItem(); double atk = weaponLevelData.DeathWalker[(int)MWeapon.Atk]; int curLv = Global.gApp.gSystemMgr.GetWeaponMgr().GetWeaponLevel(GameConstVal.WDeadthWalker); GunsSub_dataItem levelItem = Global.gApp.gGameData.GunSubDataConfig.Get(curLv); double[] weaponParams = ReflectionUtil.GetValueByProperty <GunsSub_dataItem, double[]>("base_params_" + weaponItem.qualevel, levelItem); float campAtkInc = Global.gApp.CurScene.GetMainPlayerComp().GetBuffMgr().CampPetIncAtk; m_Damage = atk * AtkParam * weaponParams[0] * (1 + campAtkInc); m_DtTime = weaponItem.dtime + m_AnimTime; m_LockTools = new PetLockDisTools(transform, pet); m_LockTools.MaxRadio = 1; m_LockTools.MinRadio = 1; m_LockTools.BreakDis = BreakDis; m_LockTools.SetBreakCall(BreakCall); }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); m_LockNode = playerGo.transform.Find("ModelNode/PetNode"); m_LockCompt = m_LockNode.GetComponent <BornNode>(); m_PursureCallBack = PursueCallBack; }
public void ChangeSecondPet(string petName, float keepTime) { if (!m_SecondPetName.Equals(keepTime)) { m_SecondPetDuration = keepTime; ResetSecondPet(); } else { m_SecondPetDuration = Mathf.Max(keepTime, m_SecondPetDuration); } m_SecondPetTime = 0; m_SecondPetGo = Global.gApp.gResMgr.InstantiateObj("Prefabs/Pet/" + petName); m_SecondPetGo.transform.SetParent(Global.gApp.gRoleNode.transform, false); m_SecondPet = m_SecondPetGo.GetComponent <BasePet>(); if (m_SecondPetGo.GetComponent <BlinkTools>()) { m_SecondPetGo.GetComponent <BlinkTools>().SetStartTime(m_SecondPetDuration - 3); } else { m_SecondPetGo.AddComponent <BlinkTools>().SetStartTime(m_SecondPetDuration - 3); } m_SecondPet.Init(m_PlayerGo, ++m_Guid); m_ChangeSecondPet = true; }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); m_Robot001Skill1Act = GetComponent <Robot001Skill1Act>(); m_Robot002Skill1Act = GetComponent <Robot001Skill2Act>(); m_Robot001Skill1Act.Init(pet, this); m_Robot002Skill1Act.Init(pet, this); }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); m_Fight = playerGo.GetComponent <Player>().GetFight(); m_UAV002SkillAct = GetComponent <UAV002SkillAct>(); m_UAV002SkillAct.SetPlayerGo(playerGo); m_UAV002SkillAct.Init(pet, this); }
public void ResetSecondPet() { if (m_SecondPetGo != null) { Object.Destroy(m_SecondPetGo); m_SecondPetGo = null; m_SecondPet = null; } m_SecondPetName = string.Empty; }
public override void Init(BasePet pet, PetAtkState controller) { base.Init(pet, controller); m_UAVGun.Init(null); m_UAVGun.enabled = false; m_LockTools = new PetLockDisTools(transform, pet); m_LockTools.MaxRadio = 1; m_LockTools.MinRadio = 1; m_LockTools.BreakDis = BreakDis; m_LockTools.SetBreakCall(BreakCall); }
public PetLockDisTools(Transform ownnerTsf, BasePet pet) { m_OwnnerTsf = ownnerTsf; m_OwnnerRigid = ownnerTsf.GetComponent <Rigidbody2D>(); m_SqrMaxRadio = MaxRadio * MaxRadio; m_SqrMinRadio = MinRadio * MinRadio; m_CurSqrRadio = m_SqrMaxRadio; m_Pet = pet; }
public override void Init(BasePet pet, PetAtkState controller) { base.Init(pet, controller); m_DogGun.SetDogPet((pet as DogPet)); m_DogGun.Init(null); m_DogGun.enabled = false; m_PursureCallBack = PursueCallBack; m_LockTools = new PetLockDisTools(transform, pet); m_LockTools.MaxRadio = 1; m_LockTools.MinRadio = 1; m_LockTools.BreakDis = BreakDis; m_LockTools.SetBreakCall(BreakCall); }
public void ChangePet(string petName) { if (petName != null && !petName.Equals(GameConstVal.EmepyStr)) { m_PlayerGo.AddComponent <DelayCallBack>().SetAction(() => { m_FirstPetGo = Global.gApp.gResMgr.InstantiateObj("Prefabs/Pet/" + petName); m_FirstPetGo.transform.SetParent(Global.gApp.gRoleNode.transform, false); m_FirstPet = m_FirstPetGo.GetComponent <BasePet>(); m_FirstPet.Init(m_PlayerGo, ++m_Guid); }, 0.1f, true); } }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); m_Fight = playerGo.GetComponent <Player>().GetFight(); }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); }
public virtual void Init(BasePet pet, PetAtkState controller) { m_Pet = pet; m_Controller = controller; }
public virtual void Init(GameObject playerGo, BasePet pet) { m_PlayerGo = playerGo; m_Pet = pet; }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); m_Fight = playerGo.GetComponent <Player>().GetFight(); m_LockSqr = FoceLockMonsterDis * FoceLockMonsterDis; }
public override void Init(GameObject playerGo, BasePet pet) { base.Init(playerGo, pet); m_SqrDisThreadHold = DisThreadHold * DisThreadHold; m_WaveMgr = m_PlayerGo.GetComponent <Player>().GetWaveMgr(); }