void updateUI()
 {
     nameView.text        = Util.UppercaseFirst(student.getFirstName()) + " " + Util.UppercaseFirst(student.getLastName());
     numYearLeftView.text = student.getNumYearLeft() + " years left";
     selectButton.GetComponentInChildren <Button>().onClick.AddListener(() => {
         select(student);
     });
 }
Exemplo n.º 2
0
 void updateUI()
 {
     nameView.text        = Util.UppercaseFirst(student.getFirstName()) + " " + Util.UppercaseFirst(student.getLastName());
     numYearLeftView.text = student.getNumYearLeft() + " years left";
     fireButton.GetComponentInChildren <Button>().onClick.AddListener(() => {
         supervisor.fireAPhDStudent(student);
         Destroy(gameObject);
     });
 }
Exemplo n.º 3
0
    public void hirePhDStudent(PhDStudent student)
    {
        // Abandoned Idea: Create a PhD student on the map
        //Vector2 newPosition = new Vector2(UnityEngine.Random.Range(0.0f, 0.2f), UnityEngine.Random.Range(0.0f, 0.2f));
        //GameObject studentObj = Instantiate(Resources.Load<GameObject>(ResourceLibrary.characterPrefab), characters[currPlayer].transform.position, Quaternion.identity, GameObject.FindWithTag("CharacterContainer").transform);
        //studentObj.GetComponent<Character>().beAPhDStudent(student, getCurrPlayer(), getCurrPlayer().getCurrGridIdx());
        //List<Character> characterList = new List<Character>(characters);
        //characterList.Add(studentObj.GetComponent<Character>());
        //characters = characterList.ToArray();

        if (getCurrPlayer().getNumPhDStudent() >= Character.maxNumPhDStudent)
        {
            Debug.Log(characters[currPlayer].name + " has too many PhD students to hire more.");
            return;
        }
        Debug.Log("PhD student " + student.getFirstName() + " " + student.getLastName() + " has been hired by " + characters[currPlayer].name);

        getCurrPlayer().addAPhDStudent(student);

        recruitmentDialog.SetActive(false);
        characterTurnEnds();
    }