public SE_Animation CreateAnimation() { if (_Preset != null) { mAnimation = _Preset.CreateAnimation(); } else { mAnimation = SE_Animation.LoadFromSerializedData(_LocalSerializedData) ?? new SE_Animation(); } return(mAnimation); }
public SE_Animation PlayAnim(SE_AnimationPreset preset) { if (preset == null) { return(null); } SE_Animation anim; var slot = GetAnimationSlot(preset); if (slot != null) { anim = slot._Animation; anim.Play(this); return(anim); } anim = preset.CreateAnimation(); anim.Play(this); return(anim); }