示例#1
0
    public void BuildTechnologyEntries(TechnologyTree technologyTree)
    {
        TechnologyEntry techEntry;

        foreach (Technology tech in technologyTree.GetPhysicsTechnologies())
        {
            techEntry      = ScriptableObject.CreateInstance("TechnologyEntry") as TechnologyEntry;
            techEntry.name = tech.GetName();
            techEntry.SetTechnology(tech);
            physicsTechnologyEntries.Add(techEntry);
        }

        foreach (Technology tech in technologyTree.GetSocietyTechnologies())
        {
            techEntry      = ScriptableObject.CreateInstance("TechnologyEntry") as TechnologyEntry;
            techEntry.name = tech.GetName();
            techEntry.SetTechnology(tech);
            societyTechnologyEntries.Add(techEntry);
        }

        foreach (Technology tech in technologyTree.GetEngineeringTechnologies())
        {
            techEntry      = ScriptableObject.CreateInstance("TechnologyEntry") as TechnologyEntry;
            techEntry.name = tech.GetName();
            techEntry.SetTechnology(tech);
            engineeringTechnologyEntries.Add(techEntry);
        }

        GenerateCurrentTechnologiesPhysics(3);
        GenerateCurrentTechnologiesSociety(3);
        GenerateCurrentTechnologiesEngineering(3);
    }
示例#2
0
 public void ShowTechnology(TechnologyTree technology)
 {
     if (technology.state != Player.curPlayer)
     {
         return;
     }
     if (technology.state != treeOwner)
     {
         treeOwner = technology.state;
         treeUI.LoadData(technology);
     }
     Switch(0);
 }
示例#3
0
 public AutoReasercher(StateAI state)
 {
     this.state     = state;
     technologyTree = state.Data.technologyTree;
 }
示例#4
0
 void Start()
 {
     technologyTree = ResourceManager.instance.GetTechnologyTree("Default");
     BuildTechnologyEntries(technologyTree);
 }