// private void LoadTransitions(Assembly assembly) //{ // Type[] types = assembly.GetTypes(); // for (int i = 0; i < types.Length; i++) // { // Type type = types[i]; // bool flag = this.transitionTypes.Contains(type); // if (!flag) // { // bool flag2 = typeof(Transition).IsAssignableFrom(type) && !type.IsAbstract; // if (flag2) // { // this.transitionTypes.Add(type); // } // } // } //} private void tmp() { StarTransition starTransition = new StarTransition(); RotateTransition rotateTransition = new RotateTransition(); VerticalWipeTransition verticalWipeTransition = new VerticalWipeTransition(); PageTransition pageTransition = new PageTransition(); RollTransition rollTransition = new RollTransition(); DiamondsTransition diamondsTransition = new DiamondsTransition(); VerticalBlindsTransition verticalBlindsTransition = new VerticalBlindsTransition(); HorizontalWipeTransition horizontalWipeTransition = new HorizontalWipeTransition(); FadeAndBlurTransition fadeAndBlurTransition = new FadeAndBlurTransition(); ExplosionTransition explosionTransition = new ExplosionTransition(); CheckerboardTransition checkerboardTransition = new CheckerboardTransition(); TranslateTransition translateTransition = new TranslateTransition(); RotateWipeTransition rotateWipeTransition = new RotateWipeTransition(); MeltTransition meltTransition = new MeltTransition(); DiagonalWipeTransition diagonalWipeTransition = new DiagonalWipeTransition(); FlipTransition flipTransition = new FlipTransition(); DotsTransition dotsTransition = new DotsTransition(); FadeAndGrowTransition fadeAndGrowTransition = new FadeAndGrowTransition(); DoubleRotateWipeTransition doubleRotateWipeTransition = new DoubleRotateWipeTransition(); DoorTransition doorTransition = new DoorTransition(); HorizontalBlindsTransition horizontalBlindsTransition = new HorizontalBlindsTransition(); FadeTransition fadeTransition = new FadeTransition(); }
public override void OnInspectorGUI() { DrawDefaultInspector(); DoorTransition myScript = (DoorTransition)target; if (SceneManager.sceneCountInBuildSettings + 1 != scenesName.Length) { OnEnable(); } for (int i = 0; i < sceneCount; i++) { if (scenesName[i] == myScript.sceneName) { index = i; indexBk = i; } } index = EditorGUILayout.Popup("Nome Da Cena", index, scenesName); if (index != indexBk) { UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene()); } myScript.sceneName = scenesName[index]; if (index != sceneCount) { if (GUILayout.Button("Ir para a cena " + scenesName[index])) { UnityEditor.SceneManagement.EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo(); UnityEditor.SceneManagement.EditorSceneManager.OpenScene(SceneUtility.GetScenePathByBuildIndex(index), UnityEditor.SceneManagement.OpenSceneMode.Single); } } }
public override void Update() { if (this._desiredTransition != this._transition) { this._fade = Lerp.Float(this._fade, 0.0f, 0.06f); if ((double)this._fade <= 0.0) { this._transition = this._desiredTransition; if (this._transition == DoorTransition.Profile) { Graphics.fade = 0.0f; Level.current = (Level) new LockerRoom(this._profile); } else if (this._transition == DoorTransition.Exit) { Graphics.fade = 0.0f; Level.current = (Level) new TitleScreen(); } else if (this._transition == DoorTransition.Album) { Graphics.fade = 0.0f; Level.current = (Level) new Album(); } } } else { this._fade = Lerp.Float(this._fade, 1f, 0.06f); if (this._selectorPosition == this._desiredSelectorPosition) { if (InputProfile.active.Down("LEFT")) { this.SelectUp(); } if (InputProfile.active.Down("RIGHT")) { this.SelectDown(); } if (InputProfile.active.Pressed("SELECT") && this._profile != null) { this._desiredTransition = DoorTransition.Profile; HUD.CloseAllCorners(); } } if (InputProfile.active.Pressed("QUACK")) { this._desiredTransition = DoorTransition.Exit; HUD.CloseAllCorners(); } if (InputProfile.active.Pressed("GRAB")) { this._desiredTransition = DoorTransition.Album; HUD.CloseAllCorners(); } if ((double)this._slideTo != 0.0 && (double)this._slide != (double)this._slideTo) { this._slide = Lerp.Float(this._slide, this._slideTo, 0.05f); } else if ((double)this._slideTo != 0.0 && (double)this._slide == (double)this._slideTo) { this._slide = 0.0f; this._slideTo = 0.0f; SFX.Play("textLetter", 0.7f); this._selectorPosition = this._desiredSelectorPosition; if (this._profiles.Count > 0) { this._profile = this._profiles[this._selectorPosition]; } } } base.Update(); }