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); }
public void ShowTechnology(TechnologyTree technology) { if (technology.state != Player.curPlayer) { return; } if (technology.state != treeOwner) { treeOwner = technology.state; treeUI.LoadData(technology); } Switch(0); }
public AutoReasercher(StateAI state) { this.state = state; technologyTree = state.Data.technologyTree; }
void Start() { technologyTree = ResourceManager.instance.GetTechnologyTree("Default"); BuildTechnologyEntries(technologyTree); }