Exemplo n.º 1
0
    public void BreakSkill()
    {
        if (m_skillBase != null)
        {
            m_skillBase.BreakSkill();
            m_skillBase.RemoveActionDelegate(ActionHandler);
            m_skillBase.DeleteSkillOverDelegate(SkillOverHandler);
            //m_skillBase.RemoveSkillEffectFireDelegate(FireSkillActionEffect);
            //m_skillBase.RemoveSkillBulletFireDelegate(FireSkillBullet);

            ChangeDisplayState(1);
        }

        /*
         *
         * if (m_curSkillEffect != null)
         * {
         *  GameObjectPool.Instance.Release(m_curSkillEffect);
         * }
         * if (m_curBullet != null)
         * {
         *  DestroyImmediate(m_curBullet);
         * }
         */
    }
Exemplo n.º 2
0
    public override void DoBeforeLeaving()
    {
        m_MonsterBehaviour.Invincible = false;
        m_MonsterBehaviour.IronBody   = false;
        if (m_currentSkillBase != null)
        {
            m_currentSkillBase.RemoveActionDelegate(ActionHandle);
            m_currentSkillBase.RemoveSkillBulletFireDelegate(FireBulletHandle);
            m_currentSkillBase.RemoveSkillEffectFireDelegate(FireSkillActionEffect);
            m_currentSkillBase.DeleteSkillOverDelegate(ActionOverHandle);

            m_currentSkillBase.BreakSkill();
        }
        //保证显身

        if (GameManager.Instance.CurrentGameMode == GameMode.SINGLE_PLAYER)
        {
            float xValue, yValue;
            this.m_MonsterBehaviour.ThisTransform.position.SetToServer(out xValue, out yValue);
            SMsgFightCommand_CS sMsgFightCommand_CS = new SMsgFightCommand_CS();
            sMsgFightCommand_CS.uidFighter  = this.m_MonsterBehaviour.RoleDataModel.SMsg_Header.uidEntity;
            sMsgFightCommand_CS.nFightCode  = m_currentSkillBase.SkillId;
            sMsgFightCommand_CS.byType      = 0;
            sMsgFightCommand_CS.fighterPosX = xValue;
            sMsgFightCommand_CS.fighterPosY = yValue;

            NetServiceManager.Instance.BattleService.SendFightCommandCS(sMsgFightCommand_CS);
        }

        m_MonsterBehaviour.ChangeDisplayState(1);
        base.DoBeforeLeaving();
    }
Exemplo n.º 3
0
 public override void Reason()
 {
     if (m_PlayerBehaviour.IsCopy)
     {
         return;
     }
     if (IsStateReady)
     {
         if (IsSkillBeBreaked)
         {
             m_skillBase.BreakSkill();
             if (m_skillCamera != null)
             {
                 m_skillCamera.GetComponent <SkillCamera>().OnDestroy();
             }
             m_PlayerBehaviour.GetSkillBySkillID(PlayerDataManager.Instance.GetBattleItemData(this.m_PlayerBehaviour.PlayerKind).NormalSkillID[0]);
             OnChangeTransition(Transition.PlayerToIdle);
         }
     }
 }
Exemplo n.º 4
0
    public override void DoBeforeLeaving()
    {
        //Debug.Log("Skill Over Time[DoBeforeLeaving]:" + Time.realtimeSinceStartup);
        m_lockedTarget               = null;
        marchForwardTargetPos        = m_PlayerBehaviour.ThisTransform.position;
        hitRadius                    = 0;
        m_PlayerBehaviour.Invincible = false;
        m_PlayerBehaviour.IronBody   = false;
        m_skillBase.RemoveActionDelegate(ActionHandler);
        m_skillBase.DeleteSkillOverDelegate(SkillOverHandler);
        IsSkillBeBreaked = true;
        m_skillBase.BreakSkill();

        m_PlayerBehaviour.StartCountResetNormalSkillStep();
        base.DoBeforeLeaving();
    }
Exemplo n.º 5
0
    public override void DoBeforeLeaving()
    {
        m_PlayerBehaviour.Invincible = false;
        m_PlayerBehaviour.IronBody   = false;
        m_skillBase.RemoveActionDelegate(ActionHandler);
        m_skillBase.DeleteSkillOverDelegate(SkillOverHandler);
        IsSkillBeBreaked = true;
        m_skillBase.BreakSkill();
        if (GameManager.Instance.CurrentGameMode == GameMode.SINGLE_PLAYER)
        {
            float xValue, yValue;
            this.m_PlayerBehaviour.ThisTransform.position.SetToServer(out xValue, out yValue);
            SMsgFightCommand_CS sMsgFightCommand_CS = new SMsgFightCommand_CS();
            sMsgFightCommand_CS.uidFighter  = this.m_PlayerBehaviour.RoleDataModel.SMsg_Header.uidEntity;
            sMsgFightCommand_CS.nFightCode  = m_skillBase.SkillId;
            sMsgFightCommand_CS.byType      = 0;
            sMsgFightCommand_CS.fighterPosX = xValue;
            sMsgFightCommand_CS.fighterPosY = yValue;

            NetServiceManager.Instance.BattleService.SendFightCommandCS(sMsgFightCommand_CS);
        }

        base.DoBeforeLeaving();
    }