/// <summary> /// m_logicSkillEnabled用于控制技能的保护状态 /// 也用于BUFF去设置技能是否可用 /// </summary> public void SetLogicEnable(bool bTrue) { CCreature cc = GetCaster(); if (cc == null) { return; } cc.m_logicSkillEnabled = bTrue; // 不能移动的技能,才需要设置逻辑是否移动,常规的MOBA技能释放 // 比如机枪,就可以边走边释放,就不设置逻辑是否移动 if (m_skillInfo.bRota) { cc.m_logicSkillRotationEnabled = !bTrue; } if (!m_skillInfo.bMove) { cc.PushCommand(CmdFspStopMove.Inst); cc.SetLogicMoveEnabled(bTrue); // 释放技能不能移动时 VBase v = cc.m_vCreature; if (v != null) { v.SetMove(bTrue); } } // 重置遥感,一般在按下移动,并技能释放完之后,还需继续移动 if (bTrue) { cc.UpdateUI_ResetJoyStick(true); } }
private void ResetMove(CCreature rec) { //rec = rec.GetRide(); if (rec != null) { // 解除BUFF状态时,如果没有晕眩,禁锢,则重置遥感,让遥感继续生效 if (!rec.bStateBuff(eBuffState.stun) && !rec.bStateBuff(eBuffState.unmove) && !rec.bStateBuff(eBuffState.sleep) && !rec.bStateBuff(eBuffState.WindBlowsUp)) { rec.SetLogicMoveEnabled(true); rec.UpdateUI_ResetJoyStick(true); } if (!rec.bStateBuff(eBuffState.stun) && !rec.bStateBuff(eBuffState.unmove) && !rec.bStateBuff(eBuffState.sleep) && !rec.bStateBuff(eBuffState.WindBlowsUp)) { rec.SetLogicMoveEnabled(true); rec.UpdateUI_ResetJoyStick(true); } } }
public void SetStopMove(CCreature rec) { if (rec == null) { return; } rec.SetLogicMoveEnabled(false); rec.PushCommand(CmdFspStopMove.Inst); //CCreature ride = rec.GetRide(); //if (ride != null) //{ // ride.m_logicMoveEnabled = false; // ride.PushCommand(CmdFspStopMove.Inst); // ride.StopAutoMove(); //} }