protected override void Awake() { base.Awake(); m_containerType = ContainerType.Control; m_controlType = ControlType.IMCDropdown; #if UNITY_EDITOR if (!Application.isPlaying) { return; } #endif m_AlphaTweenRunner = new TweenRunner <FloatTween>(); m_AlphaTweenRunner.Init(this); if (m_CaptionImage) { m_CaptionImage.enabled = (m_CaptionImage.sprite != null); } if (m_Template) { m_Template.gameObject.SetActive(false); } }
// Called by Unity prior to deserialization, // should not be called by users protected UICharacterSelect_Unit() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Test_Fill() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UITab() { if (this.m_ColorTweenRunner == null) this.m_ColorTweenRunner = new TweenRunner<ColorTween>(); this.m_ColorTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Graphic() { if (m_ColorTweenRunner == null) m_ColorTweenRunner = new TweenRunner<ColorTween>(); m_ColorTweenRunner.Init(this); useLegacyMeshGeneration = true; }
// Called by Unity prior to deserialization, // should not be called by users protected Test_UIProgressBar() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Test_UIUnitFrame_Bar() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UILoadingBar_OverlayFinish() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UIDurabilityTooltip() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
public void FadeIn() { tween?.Kill(); var fadeLevel = mat.GetFloat(FadeLevel); tween = Tween.Float(fadeLevel, 0f, duration, n => mat.SetFloat(FadeLevel, n)); }
// Called by Unity prior to deserialization, // should not be called by users protected UICastBar() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
protected AccordionElement() { if (this.m_FloatTweenRunner == null) this.m_FloatTweenRunner = new TweenRunner<FloatTween>(); this.m_FloatTweenRunner.Init(this); }
public void RegisterTweenValueType() { var runner = new TweenRunner(); // Register a test type TweenDataRegistry.RegisterTweenDataType <TestType>(GetValueTestType); // Make sure a tween of that type can be started and updated var startValue = (TestType)1f; var tweenParams = new TweenParams { TweenSecs = 10f, Ease = EaseType.Linear, Loop = LoopType.PingPong }; var tweenRef = runner.StartTween <TestType>( startValue, 10f, tweenParams, null ); // Make sure the starting value is correct var value = runner.GetTweenValue <TestType>(tweenRef); Assert.IsTrue(value == startValue, $"TestType pre update, got value {value} should be {startValue}"); runner.Update(1f / 60f); // Make sure the value has changed after updating value = runner.GetTweenValue <TestType>(tweenRef); Assert.IsTrue(value != startValue, $"TestType post update, got value {value} should be different from start value {startValue}"); runner.StopTween(tweenRef); }
protected AccordionElement() { if (m_FloatTweenRunner == null) { m_FloatTweenRunner = new TweenRunner <FloatTween>(); } m_FloatTweenRunner.Init(this); }
protected Graphic() { if (this.m_ColorTweenRunner == null) { this.m_ColorTweenRunner = new TweenRunner<ColorTween>(); } this.m_ColorTweenRunner.Init(this); }
public void FadeOut() { tween?.Kill(); mat.SetColor("_Color", color); var fadeLevel = mat.GetFloat(FadeLevel); tween = Tween.Float(fadeLevel, 1f, duration, n => mat.SetFloat(FadeLevel, n)); }
private void Awake() { _floatTweenRunner = new TweenRunner<FloatTween>(); _floatTweenRunner.Init(this); _canvasGroup = GetComponent<CanvasGroup>(); // Ensure it starts faded out _canvasGroup.alpha = 0f; }
protected UIImage() { if (m_ColorTweenRunner == null) { m_ColorTweenRunner = new TweenRunner <ColorTween>(); } m_ColorTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UILoadingOverlay() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
protected Test_CompassTester() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Demo_CharacterSelectSlot() { if (this.m_TweenRunner == null) { this.m_TweenRunner = new TweenRunner <FloatTween>(); } this.m_TweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users ProgressBarController() { if (m_FloatTweenRunner == null) { m_FloatTweenRunner = new TweenRunner <FloatTween>(); } m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UICastBar() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected DemoArrow() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
public LevelWindow() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
protected HoverMove() { if (Runner == null) { Runner = new TweenRunner <FloatTween>(); } Runner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UISelectField() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Test_UIUnitFrame_Bar() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
protected UICollapsible() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Demo_FindMatch_Info() { if (this.m_TweenRunner == null) { this.m_TweenRunner = new TweenRunner <FloatTween>(); } this.m_TweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Graphic() { if (m_ColorTweenRunner == null) { m_ColorTweenRunner = new TweenRunner <ColorTween>(); } m_ColorTweenRunner.Init(this); useLegacyMeshGeneration = true; }
// Called by Unity prior to deserialization, // should not be called by users protected UITab() { if (this.m_ColorTweenRunner == null) { this.m_ColorTweenRunner = new TweenRunner <ColorTween>(); } this.m_ColorTweenRunner.Init(this); }
protected FadeMaterial() { if (Runner == null) { Runner = new TweenRunner <FloatTween>(); } Runner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UIEffectTransition() { if (this.m_ColorTweenRunner == null) { this.m_ColorTweenRunner = new TweenRunner <ColorTween>(); } this.m_ColorTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UITooltip() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected Test_UIProgressBar() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
protected Test_FadeInOut() { if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_FloatTweenRunner.Init(this); }
protected virtual void Awake() { m_FloatTweenRunner = new TweenRunner <FloatTween>(); m_FloatTweenRunner.Init(this); m_ColorTweenRunner = new TweenRunner <ColorTween>(); m_ColorTweenRunner.Init(this); m_VectorTweenRunner = new TweenRunner <VectorTween>(); m_VectorTweenRunner.Init(this); }
private static TweenRunner GetOrCacheTweenRunner() { if (tweenRunner == null) { var runnerGameObject = new GameObject("TweenRunner"); runnerGameObject.hideFlags = HideFlags.HideAndDontSave; UnityEngine.Object.DontDestroyOnLoad(runnerGameObject); tweenRunner = runnerGameObject.AddComponent <TweenRunner> (); } return(tweenRunner); }
// Called by Unity prior to deserialization, // should not be called by users protected UIToggleActiveTransition() { if (this.m_ColorTweenRunner == null) { this.m_ColorTweenRunner = new TweenRunner <ColorTween>(); } if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_ColorTweenRunner.Init(this); this.m_FloatTweenRunner.Init(this); }
// Called by Unity prior to deserialization, // should not be called by users protected UIHighlightTransition() { if (this.m_ColorTweenRunner == null) { this.m_ColorTweenRunner = new TweenRunner <ColorTween>(); } if (this.m_FloatTweenRunner == null) { this.m_FloatTweenRunner = new TweenRunner <FloatTween>(); } this.m_ColorTweenRunner.Init(this); this.m_FloatTweenRunner.Init(this); }
public void CrossFadeFloat(TweenRunner <FloatTween> tweenRunner, float duration, float start, float end, UnityAction <float> callback, UnityAction endCallback) { var floatTween = new FloatTween { duration = duration, startValue = start, targetValue = end }; floatTween.AddOnChangedCallback(callback); if (endCallback != null) { floatTween.AddOnEndCallback(endCallback); } floatTween.ignoreTimeScale = true; tweenRunner.StartTween(floatTween); }
protected Graphic() { if (this.m_ColorTweenRunner == null) this.m_ColorTweenRunner = new TweenRunner<ColorTween>(); this.m_ColorTweenRunner.Init((MonoBehaviour) this); this.useLegacyMeshGeneration = true; }