Пример #1
0
        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);
        }
Пример #2
0
 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;
 }
Пример #3
0
 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;
 }
Пример #4
0
 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);
 }
Пример #5
0
 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);
 }
Пример #6
0
 public void ResetSecondPet()
 {
     if (m_SecondPetGo != null)
     {
         Object.Destroy(m_SecondPetGo);
         m_SecondPetGo = null;
         m_SecondPet   = null;
     }
     m_SecondPetName = string.Empty;
 }
Пример #7
0
 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);
 }
Пример #8
0
        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;
        }
Пример #9
0
 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);
 }
Пример #10
0
 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);
     }
 }
Пример #11
0
 public override void Init(GameObject playerGo, BasePet pet)
 {
     base.Init(playerGo, pet);
     m_Fight = playerGo.GetComponent <Player>().GetFight();
 }
Пример #12
0
 public override void Init(GameObject playerGo, BasePet pet)
 {
     base.Init(playerGo, pet);
 }
Пример #13
0
 public virtual void Init(BasePet pet, PetAtkState controller)
 {
     m_Pet        = pet;
     m_Controller = controller;
 }
Пример #14
0
 public virtual void Init(GameObject playerGo, BasePet pet)
 {
     m_PlayerGo = playerGo;
     m_Pet      = pet;
 }
Пример #15
0
 public override void Init(GameObject playerGo, BasePet pet)
 {
     base.Init(playerGo, pet);
     m_Fight   = playerGo.GetComponent <Player>().GetFight();
     m_LockSqr = FoceLockMonsterDis * FoceLockMonsterDis;
 }
Пример #16
0
 public override void Init(GameObject playerGo, BasePet pet)
 {
     base.Init(playerGo, pet);
     m_SqrDisThreadHold = DisThreadHold * DisThreadHold;
     m_WaveMgr          = m_PlayerGo.GetComponent <Player>().GetWaveMgr();
 }