예제 #1
0
    /** End Interface Stuff */

    private void SetUpRecruitMenu()
    {
        if (_RecruitMenuPrefab)
        {
            GameObject go = GameObject.Instantiate(_RecruitMenuPrefab, this.transform.position, this.transform.rotation);
            if (go)
            {
                _RecruitMenu = go.GetComponent <UIRecruitMenu>();
                if (_RecruitMenu == null)
                {
                    Debug.LogError("Cant Find RecruitMenu on " + this.gameObject + " " + _Name);
                }
                go.transform.SetParent(this.transform);
            }
        }
        else
        {
            _RecruitMenuPrefab = Resources.Load <GameObject>("UI/RecruitMenu");
            if (_RecruitMenuPrefab)
            {
                SetUpRecruitMenu();
            }
            else
            {
                Debug.LogError("Cant Find RecruitMenu Prefab");
            }
        }
    }
예제 #2
0
 public void Recruit(Rodent r, UIRecruitMenu menu)
 {
     // Debug.Log("MVC Rodent Recruit: " + _lastRodent);
     menu.showMenu(false, Vector3.zero, "", 0, 0);
     r.tag = "PlayerRodent"; //obsolete now
     r.Recruit();
     CheckClicks(true);
 }
예제 #3
0
 public void SetRecruitMenu(UIRecruitMenu rm)
 {
     _RecruitMenu = rm;
 }