Example #1
0
 public void RemoveResearch(Research r)
 {
     print("Remove Research");
     foreach (dfButton button in researchButtonPanel.GetComponentsInChildren <dfButton>())
     {
         if (button.Text == r.ButtonText(state.population, state.iq))
         {
             researchButtonPanel.RemoveControl(button);
             Destroy(button.gameObject);
             break;
         }
     }
 }
Example #2
0
    public void AddResearch(Research r)
    {
        if (state == null)
        {
            state = GameState.Instance;
        }
        dfButton button = (dfButton)Instantiate(prefabResearchButton);

        ResearchContainer container = button.GetComponent <ResearchContainer>();

        container.r               = r;
        container.state           = state;
        button.Text               = r.ButtonText(state.population, state.iq);
        button.ZOrder             = -1;
        researchBackButton.ZOrder = 0;
        researchButtonPanel.AddControl(button);
    }
Example #3
0
 public void RemoveResearch(Research r)
 {
     print("Remove Research");
     foreach (dfButton button in researchButtonPanel.GetComponentsInChildren<dfButton>())
     {
         if (button.Text == r.ButtonText(state.population,state.iq))
         {
             researchButtonPanel.RemoveControl(button);
             Destroy(button.gameObject);
             break;
         }
     }
 }
Example #4
0
    public void AddResearch(Research r)
    {
        if (state == null) state = GameState.Instance;
        dfButton button = (dfButton)Instantiate(prefabResearchButton);

        ResearchContainer container = button.GetComponent<ResearchContainer>();
        container.r = r;
        container.state = state;
        button.Text = r.ButtonText(state.population,state.iq);
        button.ZOrder = -1;
        researchBackButton.ZOrder = 0;
        researchButtonPanel.AddControl(button);
    }