public Wild_Motion Wild_GetMotion(bool _isRight, int _frameNumber) { Wild_Motion res = null; if (_isRight) { res = m_l_motion_right[_frameNumber]; } else { res = m_l_motion_left[_frameNumber]; } return(res); }
void Wild_Active_Update() { Wild_Active active = m_active_l_active[m_active_selActive]; active.Wild_ActiveAlways(); // Wild_Motion motion = active.Wild_GetMotion(m_active_isRight, m_active_frameCount); float aniTime = Wild_Active_GetMotionTime(); if (Wild_Active_FrameEnd(motion.Wild_GetEnd())) { active.Wild_ActiveFrameEnd(); // animation m_active_frameCount++; if (m_active_frameCount >= active.Wild_GetMotionCount(m_active_isRight)) { if (active.Wild_GetIsLoop()) { m_active_frameCount = 0; } else { Wild_Active_SettingSelActive(Wild_Character_Active_TYPE.Wild_Character_Active_TYPE_IDLE); } } } else { aniTime += Time.deltaTime / 10.0f; float frameEnd = motion.Wild_GetEnd(); if (aniTime >= frameEnd) { aniTime = frameEnd; } } m_active_ani["Take 001"].time = aniTime; }
void Wild_Init_SetFrameList(bool _isRight, string _strs1) { string[] strs2 = _strs1.Split('/'); for (int i = 0; i < strs2.Length; i++) { string[] strs3 = strs2[i].Split(','); int start = int.Parse(strs3[0]); int end = int.Parse(strs3[1]); Wild_Motion frames = new Wild_Motion(); frames.Wild_Init(start, end); if (_isRight) { m_l_motion_right.Add(frames); } else { m_l_motion_left.Add(frames); } } }