Beispiel #1
0
 // 保证受击动作播完
 public void ExitBehitState()
 {
     CancelInvoke("ExitBehitState");
     if (m_beHitState)
     {
         StateParameter stateParm = new StateParameter();
         m_beHitState.OnExit(stateParm);
         m_actor.StopAll(); // 当前动作
         m_actor.PlayAction(dizzyAction);
         m_beHitState = null;
     }
 }
Beispiel #2
0
        public override bool CanChangeState(StateParameter stateParm)
        {
            if (stateParm.state == ACTOR_STATE.AS_DEATH)
            {
                return(true);
            }
            if (stateParm.state == ACTOR_STATE.AS_BEHIT)
            {
                if (m_beHitState == null)
                {
                    m_beHitState = m_actor.m_BehitState;
                    m_beHitState.OnEnter(m_actor);
                    // 保证受击动作播完
                    BehitState.BehitInfo info = m_beHitState.GetBeHitInfo(m_actor.resid, m_beHitState.m_behitParame.damgageInfo.skillID);
                    CancelInvoke("ExitBehitState");
                    Invoke("ExitBehitState", info.NonControlTime);
                }
            }

            return(!m_isNonControl);
        }
Beispiel #3
0
        public void Init()
        {
            m_gameDataBase = CoreEntry.gGameDBMgr;

            m_actor      = this.gameObject.GetComponent <ActorObj>();
            m_BehitState = m_actor.behitState;

            m_isUseGravity      = false;
            m_gravityMotionType = GravityMotionType.GMT_NONE;

            m_attackObjForward = Vector3.zero;
            m_startToSkyPos    = Vector3.zero;

            F_ACCE = 0;

            nCount = 0;

            m_curRadius = m_actor.GetColliderRadius();

            CancelInvoke("AutoCancelStatic");
            CancelInvoke("MoveDistanceEnd");
        }