Example #1
0
	// Use this for initialization
	void Start () {
		// Очистка сохранения
		PlayerPrefs.DeleteAll();

		activeButton = GameObject.Find("GeneralBtn").GetComponent<AcivmentButton>();

		CreateAcivment("Genefffral", "Press N", 5,0);
		CreateAcivment("Genfferal", "Press S", 25,1);
		CreateAcivment("General", "Press", 17,2);
		CreateAcivment("General", "Pres", 33,3);
		CreateAcivment("General", "Pre", 43,4);
		CreateAcivment("General", "Pr", 41,1);
		CreateAcivment("General", "Pfgh", 12,0);
		CreateAcivment("General", "Preiku", 15,2);
		//CreateAcivment("General", "all", 10,0, new string[]{"Press N","Press S"});
	


		foreach (GameObject acivmentList in GameObject.FindGameObjectsWithTag("AcivmentList"))
		{
			acivmentList.SetActive(false);
		}

		activeButton.Click();
		acivmentMenu.SetActive(true);
	}
Example #2
0
	public void ChangeCategory(GameObject button)

	{
		AcivmentButton acivmentButton = button.GetComponent<AcivmentButton>();

		scrollRect.content = acivmentButton.acivmentList.GetComponent<RectTransform>();

		acivmentButton.Click();
		activeButton.Click();
		activeButton = acivmentButton;

	}