public override T Create <T>(ID id) { GameObject go = GameObject.Instantiate(BuildingBase.GetBuildingPrefab(BuildingType.TECH_LAB)); TechLab cc = go.GetComponent <TechLab>(); id.Init(); cc.id = id; SaveManager.Instance.Load(cc, id); return((T)(System.Object)cc); }
public override T Create <T>(ID id) { GameObject go = GameObject.Instantiate(BuildingBase.GetBuildingPrefab(BuildingType.RESOURCE_COLLECTOR)); ResourceCollector cc = go.GetComponent <ResourceCollector>(); id.Init(); cc.id = id; SaveManager.Instance.Load(cc, id); return((T)(System.Object)cc); }
public override T Create <T>(ID id) { GameObject go = GameObject.Instantiate(BuildingBase.GetBuildingPrefab(BuildingType.SHIP_FACTORY)); ShipFactory cc = go.GetComponent <ShipFactory>(); id.Init(); cc.id = id; SaveManager.Instance.Load(cc, id); return((T)(System.Object)cc); }
public override T Create <T>(ID id) { Debug.Log("控制中心从存档创建!!"); GameObject go = GameObject.Instantiate(BuildingBase.GetBuildingPrefab(BuildingType.CONTROL_CENTER)); ControlCenter cc = go.GetComponent <ControlCenter>(); id.Init(); cc.id = id; SaveManager.Instance.Load(cc, id); return((T)(System.Object)cc); }
/// <summary> /// 建筑新的建筑, TEST /// </summary> public void New(BuildingType type) { BuildingBase building = Instantiate <GameObject>(BuildingBase.GetBuildingPrefab(type)).GetComponent <BuildingBase>(); Build(building, LookLandIndex, currentPlanet); }