Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }