public static void StartMove(GameObject target, SkillMovementInfo info) { MovementControl mgr = target.GetComponent <MovementControl>(); if (mgr == null) { LogicSystem.GfxLog("StartMove movement control miss!"); return; } mgr.StartMove(info); }
public SkillMovementInfo Clone() { SkillMovementInfo newData = new SkillMovementInfo(); newData.IsValid = IsValid; newData.Id = Id; newData.MoveTimeMax = MoveTimeMax; newData.ForwardInfo = ForwardInfo.Clone(); newData.UpwardInfo = UpwardInfo.Clone(); newData.SidewardInfo = SidewardInfo.Clone(); newData.Gravity = Gravity; newData.IsAppendVelocity = IsAppendVelocity; return(newData); }
public void StartMove(GameObject target, SkillMovementInfo info) { Reset(); m_Target = target; m_MovementInfo = info; m_IsMoving = true; if (!info.IsAppendVelocity) { float forwardV = CaculateNumericVelocity(m_MovementInfo.ForwardInfo, m_MovementInfo.ForwardInfo.Speed, 0); float upwardV = CaculateNumericVelocity(m_MovementInfo.UpwardInfo, m_MovementInfo.UpwardInfo.Speed, 0); float sidewardV = CaculateNumericVelocity(m_MovementInfo.SidewardInfo, m_MovementInfo.SidewardInfo.Speed, 0); m_Velocity = new Vector3(sidewardV, upwardV, forwardV); } }
public static void StartMoveById(GameObject target, int id) { SkillSceneObjManager m_SceneObjMgr = target.GetComponent <SkillSceneObjManager>(); if (m_SceneObjMgr == null) { LogicSystem.GfxLog("StartMoveById miss!"); return; } SkillMovementInfo moveInfo = m_SceneObjMgr.TryGetSkillMovementInfo(id); if (moveInfo != null) { StartMove(target, moveInfo); } }
//功能:开始移动 //参数:{speed} 移动速度 public void Trigger_StartMove(string param) { #if SHOOTER_LOG Debug.Log("Trigger_StartMove param:" + param); #endif if (m_SceneObjMgr != null) { SkillSceneObjInfo sobjInfo = new SkillSceneObjInfo(param); SkillMovementInfo moveInfo = m_SceneObjMgr.TryGetSkillMovementInfo(sobjInfo.Id); if (moveInfo != null) { TriggerImpl.StartMove(this.gameObject, moveInfo); } else { Debug.Log("Trigger_StartMove null!"); } } }
public void StartMove(SkillMovementInfo info) { LogicSystem.NotifyGfxMoveControlStart(gameObject); m_MovementCom.Reset(); m_MovementCom.StartMove(this.gameObject, info); }