private void Animator_AnimationEnded(CompositionPropertyAnimator sender, AnimationEndedEventArgs args) { // Unregister from the event. sender.AnimationEnded -= Animator_AnimationEnded; // When an animator completes, remove it from the list of remaining animators and // Dispose() the animator. int index = _animators.IndexOf(sender); Debug.Assert(index >= 0); sender.Dispose(); _animators.RemoveAt(index); // When no remaining animators, notify that the transition is complete. _runningAnimators--; if ((_runningAnimators == 0) && !_finished) { Debug.Assert(_animators.Count == 0); _finished = true; TransitionFinished(this); } }
void Ship_AnimationCompleted(object source, AnimationEndedEventArgs e) { if (e.Key == "Crash") { Ship.Visible = false; } }
private void ResetSourceAnimationEnded(object sender, AnimationEndedEventArgs e) { var callback = this.runningAnimations[sender as RadAnimation].Item2; this.runningAnimations.Remove(sender as RadAnimation); callback(null); }
private void OnItemAddedAnimation_Ended(object sender, AnimationEndedEventArgs e) { SingleItemAnimationContext context = this.GetAnimationContextForTarget(e.AnimationInfo.Target as RadVirtualizingDataControlItem, true); RadAnimation endedAnimation = sender as RadAnimation; this.OnItemAddedAnimationEnded(endedAnimation, context); }
private void NewStageWindowOpened(object sender, AnimationEndedEventArgs e) { EventHandler<GestureEventArgs> handler = null; handler = (o, args) => { LayoutRoot.Tap -= handler; NewStageWindow.IsOpen = false; }; LayoutRoot.Tap += handler; }
void AnimationCompleted(object source, AnimationEndedEventArgs e) { if (e.Key == "Crash") { CarObject.StartAnimation("Forward"); _level.Status = RaceStatus.Running; } }
private void OnAnimationEnded(object sender, AnimationEndedEventArgs e) { if (m_animationStarted && e.animation.Equals(m_animationName)) { m_onComplete?.Invoke(); m_onComplete = null; m_onCancel = null; m_onStart = null; } }
private void CurrentItemAnimationEnded(object sender, AnimationEndedEventArgs e) { var animation = sender as RadAnimation; var item = this.runningAnimations[animation].Item1; if (item is IAnimated) { (item as IAnimated).IsAnimating = false; } this.runningAnimations.Remove(animation); }
// Defines the event functionality when an animation complete. private void OnAnimationEnded(CompositionPropertyAnimator sender, AnimationEndedEventArgs eventArgs) { // For sample sake, explicitly looking for only one animation. if (sender == _animator) { ((ContainerVisual)_target.Parent).Children.Remove(_target); Debug.WriteLine("Animation Complete. Remove Visual from Tree"); // Remove the registration for state event change sender.AnimationEnded -= OnAnimationEnded; } }
private void AnimationEndedOnAddedItem(object sender, AnimationEndedEventArgs e) { var animation = sender as RadAnimation; var callback = this.runningAnimations[animation].Item2; var item = this.runningAnimations[animation].Item1; if (item is IAnimated) { (item as IAnimated).IsAnimating = false; } this.runningAnimations.Remove(animation); callback(item); }
private void ItemRemovedAnimationEnded(object sender, AnimationEndedEventArgs e) { var callback = this.runningAnimations[sender as RadAnimation].Item2; if (this.scheduledModelsForRecycle.Count > 0) { var itemForRecycle = this.scheduledModelsForRecycle.First(); itemForRecycle.IsAnimating = false; this.scheduledModelsForRecycle.Remove(itemForRecycle); if (this.runningAnimations.Keys.Count > 0) { this.runningAnimations.Remove(sender as RadAnimation); } callback(itemForRecycle); } }
private void RadAnimation_OnEnded(object sender, AnimationEndedEventArgs e) { InsufficientFundWindow.IsOpen = false; }
private void ForwardCheckModeAnimationEnded(object sender, AnimationEndedEventArgs e) { (sender as RadAnimation).Ended -= this.ForwardCheckModeAnimationEnded; this.Owner.itemCheckBoxService.itemsAnimated = true; }
private void BackwardsCheckModeAnimationEnded(object sender, AnimationEndedEventArgs e) { (sender as RadAnimation).Ended -= this.BackwardsCheckModeAnimationEnded; this.Owner.itemCheckBoxService.itemsAnimated = true; this.Owner.itemCheckBoxService.OnIsCheckModeActiveChanged(); }
private void RotationAngle_AnimationEnded(CompositionPropertyAnimator sender, AnimationEndedEventArgs args) { sender.AnimationEnded -= RotationAngle_AnimationEnded; StartNewRotationAnimation(); }
private void LateUpdate() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Invalid comparison between Unknown and I4 //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown AnimationClip currentAnimation = m_currentAnimation; if (null == currentAnimation) { return; } Animation controller = m_controller; if (controller.get_isPlaying()) { if ((int)controller.get_wrapMode() != 2) { if (reachedEndOfAnimation) { return; } string name = currentAnimation.get_name(); AnimationState val = m_controller.get_Item(name); if (val.get_time() >= val.get_length()) { reachedEndOfAnimation = true; if (this.AnimationEnded != null) { AnimationEndedEventArgs val2 = new AnimationEndedEventArgs(name); this.AnimationEnded.Invoke((object)this, val2); } } } else if (this.AnimationLooped != null) { string name2 = currentAnimation.get_name(); AnimationState obj = m_controller.get_Item(name2); float time = obj.get_time(); float length = obj.get_length(); int num = (int)(Mathf.Max(0f, time - Time.get_deltaTime()) / length); if ((int)(time / length) > num) { AnimationLoopedEventArgs val3 = new AnimationLoopedEventArgs(name2); this.AnimationLooped.Invoke((object)this, val3); } } } else if (!reachedEndOfAnimation) { reachedEndOfAnimation = true; if (this.AnimationEnded != null) { AnimationEndedEventArgs val4 = new AnimationEndedEventArgs(currentAnimation.get_name()); this.AnimationEnded.Invoke((object)this, val4); } } }
private void OnItemRemovedAnimation_Ended(object sender, AnimationEndedEventArgs e) { SingleItemAnimationContext endedAnimation = this.GetAnimationContextForTarget(e.AnimationInfo.Target as RadVirtualizingDataControlItem, false); this.OnItemRemovedAnimationEnded(sender as RadAnimation, endedAnimation); }
public void SetAnimation(string animName, bool animLoops, bool async = true, bool restart = true) { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Invalid comparison between Unknown and I4 //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown bool reachedEndOfAnimation = this.reachedEndOfAnimation; AnimationClip currentAnimation = m_currentAnimation; string text; if (null != currentAnimation) { text = currentAnimation.get_name(); if (text.Equals(animName)) { if (!restart) { return; } m_currentLabel = string.Empty; AnimationState val = m_controller.get_Item(animName); if (val.get_enabled()) { val.set_time(0f); } else { m_controller.Play(animName, 4); } if ((int)m_controller.get_wrapMode() != 2) { this.reachedEndOfAnimation = Mathf.Approximately(0f, currentAnimation.get_length()); if (this.AnimationEnded != null && this.reachedEndOfAnimation) { AnimationEndedEventArgs val2 = new AnimationEndedEventArgs(animName); this.AnimationEnded.Invoke((object)this, val2); } } else { this.reachedEndOfAnimation = false; } return; } } else { text = string.Empty; } m_currentLabel = string.Empty; if (!m_controller.Play(animName, 4)) { Log.Warning("Could not play animation named '" + animName + "' on GameObject named '" + this.get_name() + "'.", 479, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Animations\\FloorMechanismAnimator.cs"); return; } AnimationState val3 = m_controller.get_Item(animName); if (null == val3) { Log.Warning("Could not play animation named '" + animName + "' on GameObject named '" + this.get_name() + "'.", 495, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Animations\\FloorMechanismAnimator.cs"); return; } m_currentAnimation = val3.get_clip(); if ((int)m_controller.get_wrapMode() != 2) { this.reachedEndOfAnimation = (val3.get_time() >= val3.get_length()); } else { this.reachedEndOfAnimation = false; } if (this.AnimationStarted != null) { AnimationStartedEventArgs val4 = new AnimationStartedEventArgs(animName, text, 0); this.AnimationStarted.Invoke((object)this, val4); } if (this.AnimationEnded != null && this.reachedEndOfAnimation && !reachedEndOfAnimation) { AnimationEndedEventArgs val5 = new AnimationEndedEventArgs(animName); this.AnimationEnded.Invoke((object)this, val5); } }