Example #1
0
        private void Setup()
        {
            if (string.IsNullOrEmpty(PrivacyPolicy))
            {
                StartCoroutine(GET_FILE(SERVER_FILE.PP));
            }

            Accept.GetComponentInChildren <TextMeshProUGUI>().text  = "Continue";
            Decline.GetComponentInChildren <TextMeshProUGUI>().text = "Back";
            Decline.onClick.AddListener(delegate()
            {
                Setup();
                BackButton.GetComponent <Button>().onClick.Invoke();
            });

            MainContent.text = "\n\n\nThe YUR Mobile App requires the creation of a YUR account." +
                               "\n In order to do that, you will have to read, understand and agree to the following" +
                               "\n Privacy Policy, Terms of Service, and End User License Agreement." +
                               "\n" +
                               "\n" +
                               "Press Continue";

            Accept.interactable = true;
            unityAction         = new UnityEngine.Events.UnityAction(delegate()
            {
                Display_PrivacyPolicy();
            });

            Accept.onClick.AddListener(unityAction);

            Legal.SetActive(true);
            SignUp.SetActive(false);
        }
Example #2
0
 public void OnClickArcade()
 {
     NextPanel(ArcadePanel);
     BackButton.SetActive(true);
     BackButton.GetComponent <Button>().onClick.AddListener(() => {
         NextPanel(MenuPanel);
         BackButton.SetActive(false);
     });
 }
Example #3
0
    private void Initialize_UI()
    {
        Title.sizeDelta          = new Vector2(Screen.height * 0.6f, Screen.height * 0.2f);
        Title.transform.position = new Vector2(Screen.width / 2, Screen.height * 0.85f);

        StartButton.sizeDelta                      = new Vector2(Screen.height / 1.5f, Screen.height / 9);
        StartButton.transform.position             = new Vector2(Screen.width / 2, Screen.height * 0.55f);
        StartButton.GetComponent <Text>().fontSize = (int)Screen.height / 17;

        OptionButton.sizeDelta                      = new Vector2(Screen.height / 1.5f, Screen.height / 9);
        OptionButton.transform.position             = new Vector2(Screen.width / 2, Screen.height * 0.39f);
        OptionButton.GetComponent <Text>().fontSize = (int)Screen.height / 17;

        ExitButton.sizeDelta                      = new Vector2(Screen.height / 1.5f, Screen.height / 9);
        ExitButton.transform.position             = new Vector2(Screen.width / 2, Screen.height * 0.23f);
        ExitButton.GetComponent <Text>().fontSize = (int)Screen.height / 17;

        LevelButton[0].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[0].transform.position = new Vector2(Screen.width * 0.1f, Screen.height * 0.65f);

        LevelButton[1].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[1].transform.position = new Vector2(Screen.width * 0.3f, Screen.height * 0.65f);

        LevelButton[2].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[2].transform.position = new Vector2(Screen.width * 0.5f, Screen.height * 0.65f);

        LevelButton[3].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[3].transform.position = new Vector2(Screen.width * 0.7f, Screen.height * 0.65f);

        LevelButton[4].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[4].transform.position = new Vector2(Screen.width * 0.9f, Screen.height * 0.65f);

        LevelButton[5].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[5].transform.position = new Vector2(Screen.width * 0.1f, Screen.height * 0.35f);

        LevelButton[6].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[6].transform.position = new Vector2(Screen.width * 0.3f, Screen.height * 0.35f);

        LevelButton[7].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[7].transform.position = new Vector2(Screen.width * 0.5f, Screen.height * 0.35f);

        LevelButton[8].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[8].transform.position = new Vector2(Screen.width * 0.7f, Screen.height * 0.35f);

        LevelButton[9].sizeDelta          = new Vector2(Screen.height / 5, Screen.height / 5);
        LevelButton[9].transform.position = new Vector2(Screen.width * 0.9f, Screen.height * 0.35f);

        BackButton.sizeDelta                      = new Vector2(Screen.height / 2.5f, Screen.height / 5);
        BackButton.transform.position             = new Vector2(Screen.height / 5, Screen.height - Screen.height / 10);
        BackButton.GetComponent <Text>().fontSize = (int)Screen.height / 20;

        for (int i = 0; i < 9; i++)
        {
            LevelButton[i].GetChild(0).gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.height / 10, Screen.height / 10);
        }
        LevelButton[9].GetChild(0).gameObject.GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.height / 5, Screen.height / 5);
    }
    private int currentState = 1; // specifies the tutorial stage

    void Start()
    {
        NextButton.GetComponent <Button>().onClick.AddListener(handleNextButton);
        Loc2NextButton.GetComponent <Button>().onClick.AddListener(handleNextButton);
        Loc3NextButton.GetComponent <Button>().onClick.AddListener(handleNextButton);
        Loc4NextButton.GetComponent <Button>().onClick.AddListener(handleNextButton);
        BackButton.GetComponent <Button>().onClick.AddListener(handleBackButton);
        Loc2BackButton.GetComponent <Button>().onClick.AddListener(handleBackButton);
        Loc3BackButton.GetComponent <Button>().onClick.AddListener(handleBackButton);
        Loc4BackButton.GetComponent <Button>().onClick.AddListener(handleBackButton);
    }
Example #5
0
    public void FadeOutMainMenuButtonsAndOpenCredits()
    {
        foreach (Button button in MainMenuButtons)
        {
            button.GetComponent <Animator>().SetTrigger("FadeOut");
        }
        creditPanel.gameObject.SetActive(true);

        BackButton.GetComponent <Animator>().SetTrigger("FadeIn");

        NamesInCredits.GetComponent <Animator>().SetTrigger("FadeIn");
    }
Example #6
0
    // Use this for initialization
    void Start()
    {
        //listeners
        CirclesButton.onClick.AddListener(() => selectedButton());
        DropButton.onClick.AddListener(() => selectedButton());
        BuffsButton.onClick.AddListener(() => selectedButton());
        BackButton.GetComponent <Button> ().onClick.AddListener(() => backButton());

        // default state
        isPanelSelected = false;

        // the first two items are displayed in the beggining
        circleModelsIndex = 2;
        dropModelsIndex   = 2;
        buffModelsIndex   = 2;

        createItemStateArrays();
    }