Ejemplo n.º 1
0
    void Start()
    {
        Scene  currentScene = SceneManager.GetActiveScene();
        string sceneName    = currentScene.name;

        StartCoroutine(LoadDropdown());

        if (sceneName == "SelectGameMode")
        {
            Button Nbtn = NormalBtn.GetComponent <Button>();
            Nbtn.onClick.AddListener(LoadNormalMode);

            Button Tbtn = TimeBtn.GetComponent <Button>();
            Tbtn.onClick.AddListener(LoadTimeAttackMode);

            Button Ibtn = InverseBtn.GetComponent <Button>();
            Ibtn.onClick.AddListener(LoadInverseMode);

            Button Abtn = AssignmentBtn.GetComponent <Button>();
            Abtn.onClick.AddListener(LoadAssignmentMode);

            Button Cbtn = CommunityBtn.GetComponent <Button>();
            Cbtn.onClick.AddListener(LoadCommunityMode);

            Button Bbtn = BackBtn.GetComponent <Button>();
            Bbtn.onClick.AddListener(LoadCharSelect);
        }
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        Scene  currentScene = SceneManager.GetActiveScene();
        string sceneName    = currentScene.name;


        if (sceneName == "Assignment")
        {
            Button Abtn = AccessBtn.GetComponent <Button>();
            Abtn.onClick.AddListener(LoadAccessGame);

            Button bBtn = BackBtn.GetComponent <Button>();
            bBtn.onClick.AddListener(LoadGameMode);
        }
    }