private void GameManagerViewModelOnCatchFlee(object sender, EventArgs eventArgs) { CatchEscape.Completed += (s, e) => { ViewModel.PokeballButtonEnabled = false; CatchFlee.Begin(); }; CatchStarted.Stop(); CatchEscape.Begin(); }
private async void GameManagerViewModelOnCatchEscape(object sender, EventArgs eventArgs) { //CatchEscape.Begin(); //CatchSuccess.SkipToFill(); CatchSuccess.AutoReverse = true; PokeballCatchAnimationStartingTranslateX.Value = PokeballTransform.TranslateX; PokeballCatchAnimationStartingTranslateY.Value = PokeballTransform.TranslateY; PokeballCatchAnimationStartingScaleX.Value = PokeballTransform.ScaleX; PokeballCatchAnimationStartingScaleY.Value = PokeballTransform.ScaleY; await Task.Delay(TimeSpan.FromSeconds(new Random().Next(1, 5))); CatchSuccess.Begin(); CatchEscape.Begin(); //TODO (from advancedrei): This storyboard needs to delay 3 seconds, then reverse the animation so the user can try again. }
private void GameManagerViewModelOnCatchEscape(object sender, EventArgs eventArgs) { CatchEscape.Begin(); }