/// <inheritdoc /> public async Task <bool> LoadInputAnimationAsync(string filepath) { if (filepath.Length > 0) { try { using (FileStream fs = new FileStream(filepath, FileMode.Open)) { animation = await InputAnimation.FromStreamAsync(fs); Debug.Log($"Loaded input animation from {filepath}"); Evaluate(); return(true); } } catch (IOException ex) { Debug.LogError(ex.Message); animation = null; } } return(false); }
/// <inheritdoc /> public bool LoadInputAnimation(string filepath) { if (filepath.Length > 0) { try { using (FileStream fs = new FileStream(filepath, FileMode.Open)) { animation = new InputAnimation(); animation.FromStream(fs); Evaluate(); return(true); } } catch (IOException ex) { Debug.LogError(ex.Message); animation = null; } } return(false); }
/// <inheritdoc /> public override void Disable() { IsEnabled = false; recordingBuffer = null; ResetStartTime(); }
/// <inheritdoc /> public override void Enable() { IsEnabled = true; recordingBuffer = new InputAnimation(); }
public AnimationCurveEnumerable(InputAnimation animation) { this.animation = animation; }
/// <inheritdoc /> public override void Disable() { base.Disable(); recordingBuffer = null; ResetStartTime(); }
/// <inheritdoc /> public override void Enable() { base.Enable(); recordingBuffer = new InputAnimation(); }