示例#1
0
    public void ChangeCategory(GameObject Button)
    {
        AchievementsButton achievementsButton = Button.GetComponent <AchievementsButton>();

        scrollRect.content = achievementsButton.achievementList.GetComponent <RectTransform>();
        achievementsButton.Click();
        activeButton.Click();
        activeButton = achievementsButton;
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        PlayerPrefs.DeleteAll();
        anim = visualAchievement.GetComponent <Animator>();

        activeButton = GameObject.Find("GeneralBotton").GetComponent <AchievementsButton>();
        AchievementCreate("General", "Press W", 5, "Press W to unlock this achievement", 0);
        AchievementCreate("General", "Press A", 5, "Press S to unlock this achievement", 1);
        AchievementCreate("General", "Press S", 5, "Press S to unlock this achievement", 2);
        AchievementCreate("General", "Press D", 5, "Press D to unlock this achievement", 3);
        AchievementCreate("General", "Press All Keys", 10, "Press All keys", 4, new string[] { "Press W", "Press A", "Press A", "Press D" });

        AchievementCreate("Other", "Click in Axe", 50, "Click in Axe for unlock", 5);

        foreach (GameObject achievementList in GameObject.FindGameObjectsWithTag("AchievementList"))
        {
            achievementList.SetActive(false);
        }

        activeButton.Click();
        AchivmentMenu.SetActive(false);
    }