Inheritance: MonoBehaviour
Ejemplo n.º 1
0
	// Use this for initialization
	void Start () {

		// REMEMBER TO REMOVE
		PlayerPrefs.DeleteAll ();

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

		CreateAchievement ("General", "Death to them All!","Let all the Civillians die.",5,0);
		CreateAchievement ("General", "The Savior","Defeat Mercury before he devours any civillian.",5,0);
        CreateAchievement ("General", "Too Quick for You", "Defeat Mercury.", 5, 0);
        CreateAchievement ("General", "Quick as Lightning", "Obtain Mercury's Haste Skill.", 10, 0, new string[] { "Too Quick for You", "Death to them All!" });

        CreateAchievement ("Dungeon","Err!", "Test!", 10,1);
		CreateAchievement ("Dungeon","Err2!", "Test!", 10,1);


		CreateAchievement ("Other","Err3!!", "Test!",10,2);
		CreateAchievement ("Other","Err4!!", "Test!", 10,2);
		CreateAchievement ("Other","Err!a!", "Test!", 10,2);


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

		achievementMenu.SetActive (false);
	}
Ejemplo n.º 2
0
	public void ChangeCategory(GameObject button){
		AchievementButton achievementButton = button.GetComponent<AchievementButton> ();

		scrollRect.content = achievementButton.achievementList.GetComponent<RectTransform> ();

		achievementButton.Click ();
		activeButton.Click ();
		activeButton = achievementButton;
	}