public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
            GameBackgroundController controller = target as GameBackgroundController;

            if (controller == null || controller.Backgrounds == null)
            {
                return;
            }

            int i = 1;

            foreach (GameBackground background in controller.Backgrounds)
            {
                if (GUILayout.Button("Transition to BG " + i))
                {
                    controller.TransitionToBackground(background);
                }
                i++;
            }
        }
Exemple #2
0
 void Awake()
 {
     Instance = this;
 }
Exemple #3
0
 void Awake()
 {
     instance = this;
 }