Example #1
0
    void OnSetup()
    {
        // Validate that the max money we can have is less than the max of a double
        if (maxMoney > double.MaxValue)
        {
            maxMoney = double.MaxValue;
        }

        // Set up the lists to contain all money names used in the game
        SetupMoneyNames();

        // Add references
        gameManager = IdleGameManager.Instance;
    }
Example #2
0
    override public void OnInspectorGUI()
    {
        DrawDefaultInspector();

        IdleGameManager myScript = (IdleGameManager)target;

        // Debugging title and toggle
        GUILayout.Label("Debugging", EditorStyles.boldLabel);
        debugging = EditorGUILayout.Toggle("Show Debug Menu", debugging);

        if (debugging)
        {
            if (GUILayout.Button("Reset Saved Data"))
            {
                myScript.Reset();
            }
        }
    }