Exemple #1
0
        public override SaveData toSaveData()
        {
            ResourceCollectorData data = new ResourceCollectorData();

            data.collectPeriod        = this.collectPeriod;
            data.currentCollectHeight = this.currentCollectHeight;
            data.prevUpdateTime       = this.prevUpdateTime;
            return(data);
        }
Exemple #2
0
        public override void fromSaveData(SaveData saveData)
        {
            ResourceCollectorData data = (ResourceCollectorData)saveData;

            this.collectPeriod        = data.collectPeriod;
            this.currentCollectHeight = data.currentCollectHeight;
            this.prevUpdateTime       = data.prevUpdateTime;
            // 加载完毕之后开始工作
            StartCollect();
        }