Ejemplo n.º 1
0
        /// <summary>
        /// 按下开枪被打斯时调用
        /// </summary>
        public void DestoryDownUpSkill()
        {
            SkillBase dSkill = CSkillMgr.GetDownUpSkill(GetUid());

            if (dSkill != null)
            {
                if (dSkill.m_skillInfo.skillType == (int)eSkillType.Down_Up)
                {
                    //UpdateUI_ResetDownUp();
                    SkillDownUp dp = dSkill as SkillDownUp;
                    dp.OnUp();
                }
            }
        }
Ejemplo n.º 2
0
        // 正式的游戏逻辑帧
        private void ExecuteFrame(int frameId, FspFrame frameMsg)
        {
            if (frameMsg != null && frameMsg.vkeys != null)
            {
                for (int i = 0; i < frameMsg.vkeys.Count; i++)
                {
                    FspVKey cmd = frameMsg.vkeys[i];
                    // 根据keyid做不同逻辑处理
                    HandleServerCmd(cmd);
                }
            }

            CFrameTimeMgr.Inst.FixedUpdate();
            CCreatureMgr.ExecuteFrame(frameId);
            CSkillMgr.ExecuteFrame(frameId);
            CBuffMgr.ExecuteFrame(frameId);
            CBuffTriggerMgr.ExecuteFrame(frameId);
        }
Ejemplo n.º 3
0
        public void EnterSkill()
        {
            CSkillInfo sInfo = GetSkillByIndex(m_cmdFspSendSkill.m_skillIndex);

            if (sInfo == null)
            {
                return;
            }

            // 如果存在引导技能,则不再创建
            SkillBase dSkill = CSkillMgr.GetDownUpSkill(GetUid());

            if (dSkill != null)
            {
                if (sInfo.m_skillInfo.skillType == (int)eSkillType.Down_Up)
                {
                    SkillDownUp dp = dSkill as SkillDownUp;
                    dp.SetCmd(m_cmdFspSendSkill);
                }
                return;
            }

            if (!m_logicSkillEnabled)
            {
                return;
            }


            //Debug.Log("技能流程:使用技能:" + sInfo.m_skillInfo.id + " "+ sInfo.m_skillInfo.name);
            if (!sInfo.IsCanUse())
            {
                return;
            }

            //Debug.Log("CD 正常进入技能:" + m_cmdFspSendSkill.m_skillIndex + " " + sInfo.m_skillDataInfo.name);

            SkillCsvData m_skillInfo = sInfo.m_skillInfo;

            StartSkill(m_skillInfo);
            sInfo.GetMainSkill().OnUseSkill();
        }
Ejemplo n.º 4
0
        public void StartSkill(SkillCsvData m_skillInfo)
        {
            switch (m_skillInfo.skillType)
            {
            case (int)eSkillType.None:
                VSkillBase nSkill = new VSkillBase();
                //nSkill.PushCommand(m_cmdFspSendSkill);

                m_curSkill = CSkillMgr.Create(eSkillType.None, nSkill);
                m_curSkill.PushCommand(m_cmdFspSendSkill);
                break;

            case (int)eSkillType.Near:
                VSkillNear vSkill = new VSkillNear();
                //vSkill.PushCommand(m_cmdFspSendSkill);

                m_curSkill = (SkillNear)CSkillMgr.Create(eSkillType.Near, vSkill);
                m_curSkill.PushCommand(m_cmdFspSendSkill);
                break;

            case (int)eSkillType.Jump:
                VSkillBase vjump = new VSkillBase();
                //vjump.PushCommand(m_cmdFspSendSkill);

                m_curSkill = (SkillJump)CSkillMgr.Create(eSkillType.Jump, vjump);
                m_curSkill.PushCommand(m_cmdFspSendSkill);
                break;

            case (int)eSkillType.Down_Up:

                VSkillDownUp vDp = new VSkillDownUp();
                //vDp.PushCommand(m_cmdFspSendSkill);

                m_curSkill = (SkillDownUp)CSkillMgr.Create(eSkillType.Down_Up, vDp);
                m_curSkill.PushCommand(m_cmdFspSendSkill);
                break;
            }
        }