private void OnEnable() { _tweenable = GetComponent <Tweenable>(); SaveSettingsManagerListButton.OnSaveSettingsManagerListButtonClickEvent += SaveSettingsManagerListButton_OnSaveSettingsManagerListButtonClickEvent; _tweenable.Snap(false); }
private void OnEnable() { _settingsManagerPageController = GetComponentInParent <SettingsManagerPagesController>(); _settingsManagerPageController.PropertyChanged += SettingsManagerPageController_PropertyChanged; _settingsManagerVisibility = GetComponentInParent <SettingsManagerVisibility>(); _settingsManagerVisibility.PropertyChanged += SettingsManagerVisibility_PropertyChanged; _tweenable = GetComponent <Tweenable>(); }
private void tweenCountText() { originalCountTextPosition = CountPanel.transform.position; CountPanel.transform.position = CountPanel.transform.position + new Vector3(0f, -2f, 0f); Tweenable countPanel = CountPanel; countPanel.TweenCompleteAction = (Action <GameObject>)Delegate.Combine(countPanel.TweenCompleteAction, new Action <GameObject>(onTweenComplete)); CountPanel.TweenPosition(originalCountTextPosition, 1f); CountPanel.transform.localScale = Vector3.zero; CountPanel.TweenScale(Vector3.one, 1f); CoroutineRunner.Start(restoreCountTextAlpha(), this, ""); }
protected override void OnEnable() { _tweenable = GetComponent <Tweenable>(); _tweenableGroup = GetComponent <TweenableGroup>(); if (_tweenableGroup == null && _tweenable == null) { Debug.LogWarningFormat("[{0}] A {1} or {2} must be present on {3}.", GetType(), typeof(TweenableGroup), typeof(Tweenable), name); return; } base.OnEnable(); UpdateVisibility(); }
private IEnumerator tweenObjectsToHUD() { YieldInstruction waitforInterval = new WaitForSeconds(tweenInterval); while (true) { GameObject particle = getParticleFromPool(); particle.transform.position = originPosition; Tweenable tweenable = particle.GetComponent <Tweenable>(); tweenable.TweenCompleteAction = (Action <GameObject>) Delegate.Combine(tweenable.TweenCompleteAction, (Action <GameObject>) delegate(GameObject go) { addParticleToPool(go); }); tweenable.TweenPosition(destinationPosition, tweenTime); yield return(waitforInterval); } }