예제 #1
0
        private void CreateCharOfficial(BattleEnum.Enum_CharSide side, int charId, int charIndex)
        {
            CharHandler h = BattleScenePool.GetInst().LoadHero(side, charId, charIndex);

            h.m_CharData.SetCharType(BattleEnum.Enum_CharType.Official);
            SetObstacleAvoidance(h);
            h.m_CharSkill.InitTriggerSkill();
            SetRingLight(h);
            BattleManager.GetInst().m_CharInScene.AddChar(h);
        }
예제 #2
0
        private void SetEffect(SkillDataSon skillDataSon, Vector3 pos)
        {
            string recepEffectPath = skillDataSon.m_Parent.m_sBulletPath;

            if (!recepEffectPath.Equals(string.Empty))
            {
                Transform effectTrans = BattleScenePool.GetInst().PopEffect(recepEffectPath);
                effectTrans.position = pos;
                BattleScenePool.GetInst().PushEffect(recepEffectPath, effectTrans, 5);
            }
        }
예제 #3
0
        public static CharHandler CreateMonster(BattleEnum.Enum_CharSide side, int charId, int charIndex, Vector3 pos, Quaternion rot, int index)
        {
            CharHandler h = BattleScenePool.GetInst().PopMonsterHandler(charId);

            SetMonsterData(h);
            SetObstacleAvoidanceMonster(h);
            SetRadius(h);
            h.ToBorn(0.3f * (index + 1));
            ResetPosition(h, pos, rot);
            BattleManager.GetInst().m_CharInScene.AddChar(h);
            return(h);
        }
예제 #4
0
        private void SetEffect(SkillDataSon skillDataSon, Vector3 pos)
        {
            if (null == skillDataSon)
            {
                return;
            }

            string recepEffectPath = skillDataSon.m_ReceptorEffect[0];

            if (!recepEffectPath.Equals(string.Empty))
            {
                Transform effectTrans = BattleScenePool.GetInst().PopEffect(recepEffectPath);
                effectTrans.position = pos;
                BattleScenePool.GetInst().PushEffect(recepEffectPath, effectTrans, 1);
            }
        }
예제 #5
0
        public static CharHandler CreateBoss(BattleEnum.Enum_CharSide side, int charId, int charIndex, Vector3 pos, Quaternion rot)
        {
            CharHandler h  = BattleScenePool.GetInst().LoadHero(side, charId, charIndex);
            Rigidbody   rb = h.m_Go.AddComponent <Rigidbody>();
            BoxCollider cl = h.m_Go.AddComponent <BoxCollider>();

            rb.useGravity = false;
            cl.isTrigger  = true;
            h.m_CharData.SetCharType(BattleEnum.Enum_CharType.General);
            SetObstacleAvoidanceBoss(h);
            SetRadius(h);
            h.m_CharSkill.InitTriggerSkill();
            SetApplyRootMotionBoss(h);
            SetRingLightBoss(h);
            ResetPosition(h, pos, rot);
            BattleManager.GetInst().m_CharInScene.AddChar(h);
            return(h);
        }
예제 #6
0
        public void RemoveConnectChar(int skillInstId, CharHandler charHandler)
        {
            List <ConnectLine> lst = BattleEnum.Enum_CharSide.Mine == charHandler.m_CharData.m_eSide ? _lstConnectMine : _lstConnectEnemy;

            for (int i = 0; i < lst.Count; ++i)
            {
                if (lst[i].m_iSkillInstID == skillInstId)
                {
                    bool bEmpty = lst[i].RemoveChar(charHandler);
                    if (bEmpty)
                    {
                        BattleScenePool.GetInst().PushEffect("Effect/PassiveSkill/ConnectLine", lst[i].m_Transform);
                        lst.RemoveAt(i);
                    }
                    return;
                }
            }
        }
예제 #7
0
        protected override void Excute(CharHandler charHandler, int index = -1, int skillInstId = -1)
        {
            List <CharHandler> targets = GetTargets(charHandler);

            if (targets.Count > 0)
            {
                for (int i = 0; i < targets.Count; ++i)
                {
                    CharHandler aimHandler = targets[i];
                    BulletBase  bullet     = BattleScenePool.GetInst().PopBullet(charHandler);
                    bullet.Shoot(charHandler, targets[i], () => { BeHitCallback(charHandler, aimHandler); });
                }
            }
            else
            {
                BulletBase bullet = BattleScenePool.GetInst().PopBullet(charHandler);
                bullet.Shoot(charHandler);
            }
        }
예제 #8
0
        public void AddConnectChar(int skillInstId, CharHandler charHandler, float value)
        {
            List <ConnectLine> lst = BattleEnum.Enum_CharSide.Mine == charHandler.m_CharData.m_eSide ? _lstConnectMine : _lstConnectEnemy;

            for (int i = 0; i < lst.Count; ++i)
            {
                if (lst[i].m_iSkillInstID == skillInstId)
                {
                    lst[i].AddChar(charHandler, value);
                    return;
                }
            }

            Transform   connectTrans = BattleScenePool.GetInst().PopEffect("Effect/PassiveSkill/ConnectLine");
            ConnectLine connectLine  = connectTrans.GetComponent <ConnectLine>();

            lst.Add(connectLine);
            connectLine.m_iSkillInstID = skillInstId;
            connectLine.AddChar(charHandler, value);
        }
예제 #9
0
        private void _SetEffect(Transform parent)
        {
            string    path        = m_SkillDataSon.m_ReceptorEffect[0];
            Transform effectTrans = BattleScenePool.GetInst().PopEffect(path);

            effectTrans.SetParent(parent);
            effectTrans.localPosition = Vector3.zero;
            funcEnd += (bool bCancel) =>
            {
                BattleScenePool.GetInst().PushEffect(path, effectTrans);

                if (m_SkillDataSon.m_ReceptorEffect.Length > 1)
                {
                    path        = m_SkillDataSon.m_ReceptorEffect[1];
                    effectTrans = BattleScenePool.GetInst().PopEffect(path);
                    effectTrans.SetParent(parent);
                    effectTrans.localPosition = Vector3.zero;

                    BattleScenePool.GetInst().PushEffect(path, effectTrans, 5);
                }
            };
        }
예제 #10
0
 private void Awake()
 {
     _inst          = this;
     _transform     = transform;
     _monsterConfig = ConfigData.GetValue("Monster_Client");
 }
예제 #11
0
 private void OnDestroy()
 {
     _inst = null;
 }
예제 #12
0
 private void _DeadEnd()
 {
     BattleScenePool.GetInst().PushMonsterHandler(this);
 }
예제 #13
0
 public Transform GetSkillBulletObj(int skillId)
 {
     return(BattleScenePool.GetInst().PopEffect <BulletTrace>(SkillHandler.GetInst().GetSkillDataByID(skillId).m_sBulletPath));
 }