public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        IngameUIManager manager = target as IngameUIManager;

        EditorGUILayout.BeginVertical(GUI.skin.box);
        {
            //Title
            EditorGUILayout.LabelField("State", GUI.skin.box);

            EditorGUILayout.BeginVertical(GUI.skin.box);
            {
                var names = manager.GetStateNameArray();

                for (int i = 0; i < names.Length; i++)
                {
                    EditorGUILayout.LabelField(
                        string.Format("[State {0}] {1}", i, names[i])
                        );
                }
            }
            EditorGUILayout.EndVertical();
        }
        EditorGUILayout.EndVertical();

        Repaint();
    }
示例#2
0
    void Awake()
    {
        Time.timeScale = 1f;
        Application.targetFrameRate = 60;

        //gameStatus = true;
        MakeInstance();

        savedCoins = false;

        _ingameUiManager = this.GetComponent<IngameUIManager>();
        _scoreManager = this.gameObject.GetComponent<ScoreManager>();
        _levelEnvironmentSpawner = GameObject.Find("LevelSpawner").GetComponent<LevelEnvironmentSpawner>();

        if (LevelTypeController.instance != null)
        {
            gameType = LevelTypeController.instance.GetGameType();
        }
        else // In the editor this runs if you are not playing from the menu scene
        {
            gameType = "Level0";
            //gameType = "Level0";      Endless
        }


        if (LevelTypeController.instance.GetLastGameSlider() == false)
        {
            StartCoroutine(FadeInMusic());
        }
    }
    private float DESPAWNPOSITION = -20f;           // Objects will be deleted behind this Z position

    void Awake()
    {
        MakeInstance();
        SetLevelVariables();

        WaterMovement(0);
        _uiManager = this.gameObject.GetComponent<IngameUIManager>();
    }
    private void Awake()
    {
        if (instance != null)
        {
            Debug.LogWarning("More than 1 IngameUIManager instance exists!");
        }
        instance = this;

        m_EditModeManager = m_EditModeMenu.GetComponent <EditModeManager>();
    }
示例#5
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         //DontDestroyOnLoad(gameObject);  // the Singelton Obj gets not deleted when change szene
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
 private void Awake()
 {
     Instance = this;
     _game_over_ui.SetActive(false);
 }
示例#7
0
 // Start is called before the first frame update
 public void Init()
 {
     UIManager = IngameUIManager.instance;
 }