Beispiel #1
0
 public async Task Play(Animation ani, float duration)
 {
     this.duration = duration;
     elapsedTime = TimeSpan.Zero;
     this.triggerKeys = null;
     this.animation = ani;
     await this.semaphore.WaitAsync();
     this.animation = null;
 }
Beispiel #2
0
 public async Task<Keys> PlayUntil(Animation ani, Keys[] keys)
 {
     this.duration = 0;
     this.triggerKeys = keys;
     this.onRelease = true;
     this.animation = ani;
     await this.semaphore.WaitAsync();
     this.animation = null;
     return currentKey;
 }