public void Start() { animationExecutor = GetComponent <AnimationExecutor>(); shownKeyFrame = AnimationExecutor.SaveKeyFrame(gameObject); hiddenKeyFrame = AnimationExecutor.SaveKeyFrame(gameObject); hiddenKeyFrame.LocalScale = Vector3.zero; disabledKeyFrame = AnimationExecutor.SaveKeyFrame(gameObject); disabledKeyFrame.LocalScale = Constants.DisabledScale; AnimationExecutor.ApplyKeyFrame(gameObject, hiddenKeyFrame); eventAudioManager = EventAudioManager.Instance; }
public static void IsVisiblePropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e) { var control = sender as UIElement; if (control != null && e.NewValue is bool) { if (((bool)e.NewValue)) { //Direction from Collapsed to Visible var animation = (IAnimation)sender.GetValue(InAnimation); AnimationExecutor.BeginAnimation(sender, animation); } else { sender.SetValue(UIElement.VisibilityProperty, Visibility.Collapsed); } } }
private void Start() { animationExecutor = GetComponent <AnimationExecutor>(); if (Presenter != null) { presenterCarouselKeyFrame = AnimationExecutor.SaveKeyFrame(Presenter.gameObject); presenterSleepingKeyFrame = AnimationExecutor.SaveKeyFrame(Presenter.gameObject); presenterAnimationExecutor = Presenter.GetComponent <AnimationExecutor>(); Presenter.Clicked += () => { Clicked.RaiseEvent(); }; } carouselKeyFrame = AnimationExecutor.SaveKeyFrame(gameObject); sleepingKeyFrame = AnimationExecutor.SaveKeyFrame(gameObject); sleepingKeyFrame.LocalScale = Vector3.zero; sleepingKeyFrame.LocalRotation = Constants.PlaneRotationCorrection + new Vector3(0, 0, 180); gridWorldScale = transform.lossyScale * Constants.GridStatePhotoScaleFactor; transform.localScale = Vector3.zero; }
protected virtual void Start() { maxWidth = transform.localScale.x; maxHeight = transform.localScale.z; animationExecutor = GetComponent <AnimationExecutor>(); }