BB.TransitionManager.TransferToLevel C# (CSharp) Метод

TransferToLevel() публичный статический Метод

public static TransferToLevel ( LevelDef def ) : void
def LevelDef
Результат void
        public static void TransferToLevel(LevelDef def)
        {
            LevelController.LevelDef = def;
            Application.LoadLevel("Level");
        }

Usage Example

Пример #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            _world = (WorldType)EditorGUILayout.IntField("world", (int)_world);
            _level = (Level)EditorGUILayout.IntField("level", (int)_level);

            if (GUILayout.Button(_difficulty.ToString()))
            {
                _difficulty = _difficulty == Difficulty.Easy
                                        ? Difficulty.Hard : Difficulty.Easy;
            }

            if (!Application.isPlaying)
            {
                return;
            }

            if (Target.IsLoaded)
            {
                return;
            }

            if (GUILayout.Button("generate"))
            {
                Target.Load(LevelDef);
            }

            if (GUILayout.Button("reload"))
            {
                TransitionManager.TransferToLevel(LevelDef);
            }
        }
All Usage Examples Of BB.TransitionManager::TransferToLevel