protected void Init() { //Window Setting m_Instance.minSize = new Vector2(WINDOW_MIN_WIDTH, WINDOW_MIN_HIEGHT); //Update Info if (null != m_ActionFrameData) { //base m_fTime = (float)m_ActionFrameData.Time; m_Config = m_ActionFrameData.MovecharFrame; //m_Config m_eCharType = m_Config.CharType; m_lstSpeedMoveList = m_Config.LstSpeedMove; //TargetNum m_nTargetNum = m_lstSpeedMoveList.Count; m_nTargetLastNum = m_nTargetNum; //LastTimePos m_lstLastTimePos = new List <Vector3>(); for (int i = 0; i < m_nTargetNum; i++) { if (m_lstSpeedMoveList[i].Target != null) { m_lstLastTimePos.Add(m_lstSpeedMoveList[i].Target.GetVector3()); } else { m_lstLastTimePos.Add(new Vector3(0, 0, 0)); } } } else { m_ActionFrameData = new ActionFrameData(); m_Config = new MoveCharFrameConfig(); m_Config.LstSpeedMove = new List <CharSpeedMove>(); } // Hint Point Source var TriggerTemplateRoot = GameObject.Find("TriggerTemplateRoot"); m_HintPointSource = TriggerTemplateRoot.transform.GetChild(0).gameObject; if (m_HintPointSource == null) { Debuger.LogError("m_HintPointSource not found"); } // Add Hint Points m_lstHintPointList = new List <GameObject>(); if (m_lstLastTimePos != null && m_lstLastTimePos.Count > 0) { for (int i = 0; i < m_lstLastTimePos.Count; ++i) { AddHintPoint(m_lstLastTimePos[i], i); } } }
private void ClearData() { // clear config if (null != m_Config) { m_Config = new MoveCharFrameConfig(); m_Config.LstSpeedMove = new List <CharSpeedMove>(); } // clear TargetList if (null != m_lstSpeedMoveList) { m_lstSpeedMoveList = new List <CharSpeedMove>(); } ClearHintPoint(); }
public MoveCharFrame(ActionPlayer action, ActionFrameData data) : base(action, data) { m_Config = m_FrameData.MovecharFrame; }