예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        /// <summary>
        /// 建筑新的建筑, TEST
        /// </summary>
        public void New(BuildingType type)
        {
            BuildingBase building = Instantiate <GameObject>(BuildingBase.GetBuildingPrefab(type)).GetComponent <BuildingBase>();

            Build(building, LookLandIndex, currentPlanet);
        }