/// <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); } }
//public void EnterMove() //{ //} //public void TickMove() //{ // if (m_cmdFspMove == null) // return; // Vector2d moveDir = m_cmdFspMove.m_dir.normalized; // FixedPoint delta = new FixedPoint(FSPParam.clientFrameScTime) * GetSpeed(); // Vector2d nextPos = m_curPos + moveDir * delta; // SetPos(nextPos); // SetDir(moveDir); // 技能前摇时,移动时,模型表现方向失效,比如机枪移动时射击 // SetSpeed(GetSpeed()); // //Debug.Log("无障碍移动"); // m_vCreature.SetBarrier(false); //} public override void Destory() { m_destroy = true; if (m_vCreature != null) { m_vCreature.Destory(); m_vCreature = null; } }
public void SetHUD(eHUDType type, string text, CCreature cc) { if (cc == null || cc.m_vCreature == null) { return; } VBase vObj = cc.m_vCreature; Vector3 pos = vObj.GetEnt().GetPos() + Vector3.up * vObj.m_baseInfo.m_headHeight; m_ui.SetHUD(type, text, GUIManager.GetUIPos(pos)); }
public static VBase Create(eVOjectType type) { VBase obj = null; switch (type) { case eVOjectType.Creature: obj = new VObject(); break; case eVOjectType.SkillTrigger: obj = new VTrigger(); break; } obj.m_id = m_uid++; Add(obj.m_id, obj); return(obj); }
public static void Add(int uid, VBase creature) { m_dicPlayer[uid] = creature; }