/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>null.</returns> public static AnimaSeqBase RemoveFromList(AnimaSeqBase sequence) { if (m_seqList == null) { return(null); } if (m_seqList.Contains(sequence)) { m_seqList.Remove(sequence); } return(null); }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>Sequence.</returns> public static AnimaSeqBase AddToList(AnimaSeqBase sequence) { if (m_seqList == null) { m_seqList = new List <AnimaSeqBase>(); } if (!m_seqList.Contains(sequence)) { m_seqList.Add(sequence); } return(sequence); }
/// <summary> /// Anima main class constructor. /// </summary> public AnimaPart(Anima anima, AnimaPart parent, MyEntity entity) { m_anima = anima; m_entity = entity; m_parent = parent; m_smoothAnim = false; m_enabled = true; m_visible = true; m_onTransform = null; m_onComplete = null; m_seq = null; m_playMode = Anima.Playback.HALT; m_playMode2 = Anima.Playback.HALT; m_cursorPos = 0f; m_speed = 1f; m_lastCursorPos = 0; m_disableRootColor = false; m_position = Vector3.Zero; m_rotation = Quaternion.Identity; m_scale = Vector3.One; }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>null.</returns> protected static AnimaSeqBase PManRem(AnimaSeqBase sequence) { return(AnimaSeqManager.RemoveFromList(sequence)); }
/// <summary> /// Get data associated to keyframe. /// </summary> /// <param name="keyframe">keyframe</param> /// <param name="data">output of data</param> /// <returns>true on success</returns> public bool GetKeyframeData(int keyframe, out AnimaSeqBase.Keyframe data) { if (m_kEnd == 0) { // No data! Shouldn't happen! data = new AnimaSeqBase.Keyframe(); return false; } if (keyframe < m_kStart) keyframe = m_kStart; if (keyframe > m_kEnd) keyframe = m_kEnd; data = m_keyframes[keyframe - m_kStart]; return true; }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>Sequence.</returns> protected static AnimaSeqBase PManAdd(AnimaSeqBase sequence) { return(AnimaSeqManager.AddToList(sequence)); }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>null.</returns> public static AnimaSeqBase RemoveFromList(AnimaSeqBase sequence) { if (m_seqList == null) return null; if (m_seqList.Contains(sequence)) m_seqList.Remove(sequence); return null; }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>Sequence.</returns> public static AnimaSeqBase AddToList(AnimaSeqBase sequence) { if (m_seqList == null) m_seqList = new List<AnimaSeqBase>(); if (!m_seqList.Contains(sequence)) m_seqList.Add(sequence); return sequence; }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>null.</returns> protected static AnimaSeqBase PManRem(AnimaSeqBase sequence) { return AnimaSeqManager.RemoveFromList(sequence); }
/// <summary> /// Used internally. /// </summary> /// <param name="sequence">Sequence.</param> /// <returns>Sequence.</returns> protected static AnimaSeqBase PManAdd(AnimaSeqBase sequence) { return AnimaSeqManager.AddToList(sequence); }