Example #1
0
        Vector2 getSize(SkillClassDisplayDesc skillClass)
        {
            Vector2 re = new Vector2(0, 0);

            if (skillClass.castStageDataList.Count > 0)
            {
                OneDamageInfo damageInfo = (OneDamageInfo)skillClass.castStageDataList[0];
                if (damageInfo != null)
                {
                    if (DamageTypeID.DTID_RECT == damageInfo.type)
                    {
                        m_shape  = TrapShape.SHAPE_rectangle;
                        m_widthZ = damageInfo.damageNode.rectDamage.length;
                        m_widthX = damageInfo.damageNode.rectDamage.width;
                    }
                    else if (DamageTypeID.DTID_FUN == damageInfo.type)
                    {
                        m_shape = TrapShape.SHAPE_circel;

                        m_widthZ = damageInfo.damageNode.funDamage.radius;
                        m_widthX = damageInfo.damageNode.funDamage.radius;
                    }
                }
            }
            return(re);
        }
Example #2
0
        public override void Preload(ISkillCellData cellData, SkillBase skillBase)
        {
            //m_dataIndex = param.damageCellIndex;
            m_oneDamageInfo = (OneDamageInfo)cellData;
            m_skillBase     = skillBase;

            GameObject frameStopObj = CoreEntry.gGameObjPoolMgr.InstantiateSkillCell("Skill/Cell/frameStop");

            if (frameStopObj != null)
            {
                frameStopObj.transform.parent = transform;

                ISkillCell skillCell = frameStopObj.GetComponent <ISkillCell>();

                skillCell.Preload(m_oneDamageInfo.frameStopDesc, m_skillBase);

                m_skillBase.AddSkillCell(frameStopObj);
            }

            if (m_oneDamageInfo.cameraShakeDesc != null)
            {
                GameObject cellObj = CoreEntry.gGameObjPoolMgr.InstantiateSkillCell(m_oneDamageInfo.cameraShakeDesc.prefabPath);
                cellObj.transform.parent = transform;

                ISkillCell skillCell = cellObj.GetComponent <ISkillCell>();
                skillCell.Preload(m_oneDamageInfo.cameraShakeDesc, m_skillBase);

                m_skillBase.AddSkillCell(cellObj);
            }
        }
Example #3
0
        //private MovePosAttackDesc m_movePosAttackDesc = null;

        public override void Init(ISkillCellData cellData, SkillBase skillBase)
        {
            m_skillBase = skillBase;
            //聚怪技能 配置
            m_oneDamageInfo = (OneDamageInfo)cellData;
            m_dataIndex     = 0;
        }
Example #4
0
        public override void Init(ISkillCellData cellData, SkillBase skillBase)
        {
            //m_dataIndex = param.damageCellIndex;
            m_oneDamageInfo = (OneDamageInfo)cellData;

            m_skillBase = skillBase;

            //重新计算hittime
            if (skillBase.m_skilleffect != null)
            {
                // m_oneDamageInfo.hitTime = skillBase.m_skilleffect.delay * 0.001f;
            }

            m_dataIndex          = 0;
            m_repeateKeep        = 0;
            m_isHadLoadFrameStop = false;
        }
Example #5
0
        void PrepareDownTime()
        {
            CancelInvoke("PrepareDownTime");
            CoreEntry.gEventMgr.TriggerEvent(GameEvent.GE_BOSS_RISE_TO_SKY_STATED, null);
            //位移恢复
            m_skillBase.m_actor.transform.position -= new Vector3(0, 5, 0);

            if (m_aimActorObject != null)
            {
                m_skillBase.m_actor.transform.position = m_aimActorObject.thisGameObject.transform.position;
            }

            //影子恢复
            m_skillBase.m_actor.ShowBlobShadow();

            //脚底特效
            if (!string.IsNullOrEmpty(m_bossDeathFromSkyDesc.efxPrefab) && m_aimActorObject != null)
            {
                Object oj = CoreEntry.gResLoader.LoadResource(m_bossDeathFromSkyDesc.efxPrefab);
                if (oj != null)
                {
                    GameObject efxObj = Instantiate(oj) as GameObject;
                    SceneEfx   efx    = efxObj.AddComponent <SceneEfx>();
                    efx.Init(m_aimActorObject.thisGameObject.transform.position, 5);
                }
            }

            //预警贴花
            if (!string.IsNullOrEmpty(m_bossDeathFromSkyDesc.efxPrefab) && m_aimActorObject != null)
            {
                if (m_WarningDecel)
                {
                    Vector3 pos = m_skillBase.m_actor.transform.position;
                    m_WarningDecel.SetPositionOnGround(pos);
                    m_WarningDecel.ShowDecal();
                }
                else
                {
                    float      fbig       = 0.20f; //贴花比实际伤害范围大百分之fbig
                    DamageCell damageCell = m_skillBase.GetComponentInChildren <DamageCell>();
                    //DamageCell damageCell = m_skillBase.m_actor.GetComponent<DamageCell>();
                    if (damageCell)
                    {
                        OneDamageInfo damageInfo = damageCell.GetOneDamageInfo();
                        if (null != damageInfo && !string.IsNullOrEmpty(m_bossDeathFromSkyDesc.efxPrefab))
                        {
                            //Vector3 pos = m_skillBase.m_actor.transform.position;

                            m_efxObj = Instantiate(
                                CoreEntry.gResLoader.LoadResource(m_bossDeathFromSkyDesc.efxPrefab)) as GameObject; //(damageInfo.efxWarning)) as GameObject;

                            if (m_efxObj == null)
                            {
                                return;
                            }

                            ParticleScaler ScaleComponet = m_efxObj.GetComponent <ParticleScaler>();
                            if (ScaleComponet == null)
                            {
                                ScaleComponet = m_efxObj.AddComponent <ParticleScaler>();
                            }
                            // ScaleComponet.particleScale = m_actor.actorCreatureDisplayDesc.sacle ;

                            //策划要求缩放里面的例子
                            //ScaleComponet.prevScale = 1.0f;


                            m_efxObj.transform.position = new Vector3(m_skillBase.m_actor.transform.position.x,
                                                                      m_skillBase.m_actor.transform.position.y + 0.2f, m_skillBase.m_actor.transform.position.z);
                            if (DamageTypeID.DTID_FUN == damageInfo.type)
                            {
                                m_efxObj.transform.forward = m_skillBase.m_actor.transform.forward;
                                //m_efxObj.transform.localScale = new Vector3(1.0f, 0f, 1.0f) * damageInfo.damageNode.funDamage.radius * 2 * (1 + fbig);

                                ScaleComponet.particleScale = damageInfo.damageNode.funDamage.radius * 2 * (1 + fbig);
                            }
                            else if (DamageTypeID.DTID_RECT == damageInfo.type)
                            {
                                m_efxObj.transform.forward = m_skillBase.m_actor.transform.forward;
                                //m_efxObj.transform.localScale = new Vector3(1.0f, 0f, 1.0f) * damageInfo.damageNode.funDamage.radius * 2 * (1 + fbig);
                                ScaleComponet.particleScale = damageInfo.damageNode.funDamage.radius * 2 * (1 + fbig);
                            }



                            //Vector3 decalPos = pos + 0.2f * m_skillBase.m_actor.m_transform.up;  //实际贴花位置比原来高0.2米  防止看不到
                            //if (DamageTypeID.DTID_FUN == damageInfo.type)
                            //{
                            //    m_WarningDecel = WarningDecel.CreateSectorDecal(m_bossDeathFromSkyDesc.efxPrefab, decalPos,
                            //         damageInfo.damageNode.funDamage.radius * 2 * (1 + fbig), damageInfo.damageNode.funDamage.angle);
                            //}
                            //else if (DamageTypeID.DTID_RECT == damageInfo.type)
                            //{
                            //    m_WarningDecel = WarningDecel.CreateRectangleDecal(m_bossDeathFromSkyDesc.efxPrefab, decalPos,
                            //             damageInfo.damageNode.rectDamage.width * (1 + fbig), damageInfo.damageNode.rectDamage.length * (1 + fbig));
                            //}
                        }
                    }
                }
            }
        }