public void OnNext() { if (_currScript == _scriptPaths.Count - 1 && _currEcosystem == _ecosystemPaths.Count - 1) { enabled = false; transitionController.BeginSandboxTransition(); buttonAnchor.SetActive(false); Tween.Single().Target(simManager.displayAnchor). ToLocalScale(0). OverTime(1). Smooth(). Play(); return; } _currScript++; if (_currScript >= _scriptPaths.Count) { _currEcosystem++; _currScript = 0; loadScripts(); transition(forceReset: false); } else { if (_currLoadData.autoTransitionTime > 0) { Tween.AfterDelay(_currLoadData.autoTransitionTime, OnNext); } } updateText(); }
private void onSimulationTransitionEnded() { if (_currLoadData.autoTransitionTime > 0) { Tween.AfterDelay(_currLoadData.autoTransitionTime, OnNext); } }
private void blink() { eyesOpenAnchor.SetActive(false); eyesClosedAnchor.SetActive(true); Tween.AfterDelay(eyesClosedTime, () => { eyesOpenAnchor.SetActive(true); eyesClosedAnchor.SetActive(false); }); }
private void OnEnable() { _renderStarCommands = new CommandBuffer(); _renderStarCommands.name = "Draw Stars"; _combineStarCommands = new CommandBuffer(); _combineStarCommands.name = "Combine Stars"; _myCamera = GetComponent <Camera>(); Camera.onPostRender += drawCamera; uploadGradientTextures(); StartCoroutine(endOfFrameCoroutine()); updateCameraCommandBuffer(); Tween.AfterDelay(0.1f, () => generateCommandBuffer()); }
void OnEnable() { if (!hasExperiencedTutorial && !forceLobbyExperience) { transitionWithoutButtons(); return; } Tween.AfterDelay(appearDelay, () => { _buttonTween = Tween.Persistent(). Target(tutorialButton.transform).LocalScale(Vector3.zero, tutorialButton.transform.localScale). Target(sandboxButton.transform).LocalScale(Vector3.zero, sandboxButton.transform.localScale). Smooth(transitionCurve). OverTime(transitionTime). OnReachEnd(() => { tutorialButton.enabled = true; sandboxButton.enabled = true; }); _buttonTween.Play(); }); }