public bool EditAnimation(WeaponType nWeaponType, string szOldName, string szName, string szFileName, AnimationLoopType nLoopType) { ModelAnimation ani = FindAnimation(nWeaponType, szOldName); if (ani == null) { return(false); } if ((szOldName == szName) && (szFileName == ani.szFileName) && (nLoopType == ani.nLoopType)) { return(false); } ani.Set(nWeaponType, szName, szFileName, nLoopType); m_bEdited = true; return(true); }
public bool InsertAnimation(WeaponType nWeaponType, string szName, string szFileName, AnimationLoopType nLoopType) { ModelAnimation ani = FindAnimation(nWeaponType, szName); if (ani != null) { return(false); } ani = new ModelAnimation(); ani.Set(nWeaponType, szName, szFileName, nLoopType); m_Animations.Add(ani); if (nWeaponType != WeaponType.WT_NONE) { SetupWeaponAniNames(); } m_bEdited = true; return(true); }