|
|
|
@ -11,6 +11,7 @@ namespace ET
|
|
|
|
|
self.Position = new Vector2(buildingProto.X, buildingProto.Y); |
|
|
|
|
self.ConfigId = buildingProto.ConfigId; |
|
|
|
|
self.Durable = buildingProto.Durable; |
|
|
|
|
self.IsUpgrade = buildingProto.IsUpgrade; |
|
|
|
|
if (buildingProto.Farmland != null) |
|
|
|
|
{ |
|
|
|
|
var farmland = self.AddChildWithId<Farmland>(buildingProto.Farmland.id); |
|
|
|
@ -24,7 +25,9 @@ namespace ET
|
|
|
|
|
ConfigId = self.ConfigId, |
|
|
|
|
X = self.Position.x, |
|
|
|
|
Y = self.Position.y, |
|
|
|
|
Durable = self.Durable}; |
|
|
|
|
Durable = self.Durable, |
|
|
|
|
IsUpgrade = self.IsUpgrade |
|
|
|
|
}; |
|
|
|
|
if (self.Config.Special == (int) StructureSpecialEnum.FARMLAND) |
|
|
|
|
{ |
|
|
|
|
foreach (var v in self.Children.Values) |
|
|
|
|