Exemplo n.º 1
0
        public override void OnEnter(Buff _ownerBuff)
        {
            base.OnEnter(_ownerBuff);

            skillIndex = -1;

            //     owner.BreakSkillWhenHit(ownerBuff.skillID);

            //玩家不可以操作方向
            owner.ReqirueCanNotBeControlledByInput();
            FroceToNormalAttack();
            tag = owner.ForbidToUseSkill();
            ActorAgent aa = owner.GetComponent <ActorAgent>();

            if (aa != null)
            {
                if (aa.enabled == true)
                {
                    aa.enabled = false;
                    hasAI      = true;
                }
                else
                {
                    hasAI = false;
                }
            }
        }
Exemplo n.º 2
0
 public override void OnExit()
 {
     base.OnExit();
     if (m_type > (int)limitType.Dizzy)
     {
         LimitParam param = new LimitParam();
         param.keepTime   = 0;
         param.bStopActor = false;
         param.iState     = 0;
         owner.OnEnterLimit(param);
     }
 }
Exemplo n.º 3
0
        public override void OnEnter(Buff _ownerBuff)
        {
            base.OnEnter(_ownerBuff);

            if (m_type == (int)limitType.Dizzy)
            {
                // 眩晕
                DizzyParam param = new DizzyParam();
                param.keepTime = ownerBuff.mLife;
                owner.OnEnterDizzy(param);

                //眩晕对应的状态不同
                RelativeState = ACTOR_STATE.AS_DIZZY;
            }

            if (m_type == (int)limitType.Sleep || m_type == (int)limitType.Frozen ||
                m_type == (int)limitType.Move || m_type == (int)limitType.Attack || m_type == (int)limitType.Skill ||
                m_type == (int)limitType.Floating || m_type == (int)limitType.Hitdown)
            {
                LimitParam param = new LimitParam();
                param.keepTime   = ownerBuff.mLife;
                param.bStopActor = false;
                param.iState     = m_type;
                if (m_type == (int)limitType.Sleep)
                {
                    // 睡眠
                    param.buffid = ownerBuff.mBuffType;
                }
                if (m_type == (int)limitType.Frozen)
                {
                    // 冰冻
                    param.bStopActor = true;
                }

                owner.OnEnterLimit(param);
            }
        }