public virtual void Inject( AnimationMonitor animationMonitor, SwipeManager swipeManager, ICurve curve, ISelectedListener <UserEncounterSelectedEventArgs> encounterSelectedListener, ISelector <UserSectionSelectedEventArgs> sectionSelector, ISelectedListener <UserSectionSelectedEventArgs> sectionSelectedListener) { foreach (var behaviour in swipableSectionBehaviours) { if (behaviour is ISwipableSection swipableSection) { SwipableSections.Add(swipableSection); } } AnimationMonitor = animationMonitor; SwipeManager = swipeManager; Curve = curve; EncounterSelectedListener = encounterSelectedListener; SectionSelector = sectionSelector; SectionSelectedListener = sectionSelectedListener; SectionSelectedListener.Selected += OnSectionSelected; if (SectionSelectedListener.CurrentValue != null) { OnSectionSelected(SectionSelector, SectionSelectedListener.CurrentValue); } }
///<summary> /// Use this for initialization ///</summary> override protected void Start() { base.Start(); animation = GetComponentInChildren <Animation>(); animationMonitor = GetComponentInChildren <AnimationMonitor>(); _particleSystem = GetComponentInChildren <ParticleSystem>(); }
protected virtual void StartMove() { AnimationMonitor.AnimationStarting(this); DragOverrideScript.DragAllowed = false; foreach (var swipableSection in SwipableSections) { swipableSection.StartMove(); } }
protected virtual void EndMove() { foreach (var swipableSection in SwipableSections) { swipableSection.EndMove(); } AnimationMonitor.AnimationStopping(this); DragOverrideScript.DragAllowed = true; }
public virtual void Inject( AnimationMonitor animationMonitor, ISelector <LoadingReaderSceneInfoSelectedEventArgs> loadingReaderSceneInfoSelector, ISelectedListener <WriterSceneInfoSelectedEventArgs> writerSceneInfoSelector, ICurve curve) { AnimationMonitor = animationMonitor; LoadingReaderSceneInfoSelector = loadingReaderSceneInfoSelector; WriterSceneInfoSelector = writerSceneInfoSelector; Curve = curve; }
protected virtual IEnumerator Open() { AnimationMonitor.AnimationStarting(this); var curveX = Curve.GetCurveX(1 - aspectRatioHandler.Offset / aspectRatioHandler.Width); while (aspectRatioHandler.Offset > 0) { yield return(null); curveX += Time.deltaTime / AnimationTime; aspectRatioHandler.Offset = aspectRatioHandler.Width - Curve.GetCurveY(curveX) * aspectRatioHandler.Width; } aspectRatioHandler.Offset = 0; AnimationMonitor.AnimationStopping(this); }
///<summary> /// Use this for initialization ///</summary> override protected void Start() { base.Start(); // _clickGUIText = clickGUIText_gameobject.GetComponent <GUIText>(); _logo_guitexture = logoGUITexture_gameobjects.GetComponent <GUITexture>(); animationMonitor = GetComponent <AnimationMonitor>(); //EXPERIMENT: STORE CLIPS IN CUSTOM PROPERTIES AND ADD THEM DYNAMICALLY // NOT REQUIRED FOR THE CURRENT SETUP, BUT COULD BE USEFUL FOR DYNAMIC // ANIMATION SETUP animation.AddClip(introStartAnimationClip, ANIMATION_NAME_INTRO_UI_START); animation.AddClip(introEndAnimationClip, ANIMATION_NAME_INTRO_UI_END); }
// PRIVATE STATIC //-------------------------------------- // Methods //-------------------------------------- ///<summary> /// Use this for initialization ///</summary> public void Start() { animation = GetComponentInChildren <Animation>(); animationMonitor = GetComponentInChildren <AnimationMonitor>(); _yPosition_lerptarget = new LerpTarget(0, 0, -5, 5, 0.5f); }