Пример #1
0
    //On New
    public void New()
    {
        mainUI.SetActive(false);
        createUI.SetActive(true);
        continueUI.SetActive(false);
        inMenus = InMenus.Create;

        for (int i = 0; i < options.Length; i++)
        {
            int k = i;
            options[i].transform.GetChild(2).GetComponent <Button>().onClick.AddListener(() => MinusItem(k));
            options[i].transform.GetChild(3).GetComponent <Button>().onClick.AddListener(() => PlusItem(k));
        }
    }
Пример #2
0
    //when the continue button is pressed
    void OnContinuedGame()
    {
        string[] data = PlayerPrefs.GetString("CharacterSkin").Split('/');
        character.SetNewCharacter(character.custom.GetCharacter(int.Parse(data[0]), int.Parse(data[1]), int.Parse(data[2]), int.Parse(data[3]), int.Parse(data[4])));

        mainUI.SetActive(false);
        createUI.SetActive(false);
        continueUI.SetActive(true);
        character.aimOverride = false;

        inMenus = InMenus.None;
        Camera.main.transform.localPosition = Vector3.back * 35;
        Camera.main.fieldOfView             = 20;

        EnablePlayerWalking();
        cameraRig.enabled = true;
    }