Exemplo n.º 1
0
    public void Awake()
    {
        Debug.Log("scene number" + SceneManager.GetActiveScene().buildIndex);
        ////if we go back to the first sceme clean it up
        if (SceneManager.GetActiveScene().buildIndex == 0)
        {
            Debug.Log("scene number" + SceneManager.GetActiveScene().buildIndex);

            winnersvLoser = new Dictionary <int, HashSet <int> >();
            // winning intellegence categories and array of categories they have beaten

            qlList       = new Dictionary <int, List <string> >();
            JobTitleList = new Dictionary <int, Dictionary <string, int[]> >();

            All8Intelligences = new string[8];

            myIntelligences = new List <int>();


            instance = null;
        }



        if (instance == null)
        {
            //if not, set instance to this
            instance = this;
            initDatabase();
        }
        //If instance already exists and it's not this:
        else if (instance != this)
        {
            //Then destroy this. This enforces our singleton pattern, meanAwing there can only ever be one instance of a GameManager.
            Destroy(gameObject);
        }

        //Sets this to not be destroyed when reloading scene
        DontDestroyOnLoad(gameObject);

        //Get a component reference to the attached BoardManager script


        //Call the InitGame function to initialize the first level
    }
Exemplo n.º 2
0
    // Use this for initialization
    public void  addSmarts(int buttonNumber)
    {
        //Debug.Log("buttonNumber" + buttonNumber);

        ///	Debug.Log(DatabaseRedsultsScript.All8Intelligences[1] + "\n");


        DatabaseRedsultsScript.fillmyIntelligences(buttonNumber);
        iam.SetActive(true);
        if (b_counter <= 2)
        {
            b_counter++;
            Button myButton = BUTS[buttonNumber].GetComponent <Button>();
            myButton.interactable = false;
            smText.text          += DatabaseRedsultsScript.All8Intelligences[buttonNumber] + "\n";
            if (b_counter == 3)
            {
                SceneManager.LoadScene("Calculate");
            }
        }
    }
Exemplo n.º 3
0
 public void startAgain()
 {
     DatabaseRedsultsScript.showmyIntelligences(0);
     //showmyIntelligences
     SceneManager.LoadScene("YouCanBeAnyThingOpeningScreen");
 }
Exemplo n.º 4
0
 public void LearnMore()
 {
     DatabaseRedsultsScript.showmyIntelligences(0);
     //showmyIntelligences
     SceneManager.LoadScene("learnmore");
 }