public void OnSelect(BaseEventData eventData) { foreach (GameObject go in Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]) { if (go.name == "ClassSelect") { g = go; } } string id = transform.parent.gameObject.transform.GetChild(0).gameObject.GetComponent <Text>().text.ToString(); // Debug.Log("!!!!!!!!!!!!!" +id); BaseCharachteristics b; if (this.gameObject.name == "accept") { g.SetActive(true); // b = NPCApplicants.GetFollowerByID(int.Parse((id))); NPCSystem.followerIdToUpdateClass = int.Parse((id)); //NPCSystem.addFollower(b.Name, b.Type,"", "", "", "idle"); Destroy(transform.parent.gameObject); NPCApplicants.removeFollower(int.Parse((id))); } if (this.gameObject.name == "reject") { transform.parent.gameObject.SetActive(false); NPCApplicants.removeFollower(int.Parse((id))); } }
public void classWeaponMenu() { foreach (GameObject go in Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]) { if (go.name == "WeaponAssign") { WeaponMenuList = go; } } WeaponMenuList.SetActive(true); NPCApplicants npc = new NPCApplicants(); npc.PopulateListForWeapons(); }
public void classMenu() { foreach (GameObject go in Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[]) { if (go.name == "AssignListTavern") { classMenuList = go; } } classMenuList.SetActive(true); NPCApplicants npc = new NPCApplicants(); npc.PopulateList(); }