Exemplo n.º 1
0
        public void Init()
        {
            foreach (Transform child in JobContent)
                DestroyObject(child.gameObject);
            if(Host.SelectedCharacter == null)
                EndDialog();
            else
            {
                selected = null;
                foreach (var job in GameController.Inst.Jobs.Where(j => j.CheckCharacter(Host.SelectedCharacter)))
                {
                    var item = Instantiate(JobPrefab).GetComponent<JobToggle>();
                    item.Job = job;
                    item.transform.SetParent(JobContent, false);
                    item.Dialog = this;

                }
            }
        }
Exemplo n.º 2
0
 public void SendWork(Character c, Job j)
 {
     if (c.HeroState == Character.State.Free)
     {
         c.HeroState = Character.State.Work;
         c.Job = j;
         HeroCounts();
         AGEventHandler.Inst.UpdateInfo();
     }
 }
Exemplo n.º 3
0
 public void Select(Job job)
 {
     selected = job;
 }