public Player FromProto(nicehu.pb.Player player) { this.levelAttrib = new LevelAttrib(); this.Items = new List <Item>(); this.playerId = player.playerId; this.Name = player.name; this.Money = player.money; this.Diamond = player.diamond; foreach (nicehu.pb.Item item in player.items) { nicehu.clientcore.Item _item = new nicehu.clientcore.Item(); _item.FromProto(item); this.items.Add(_item); } return(this); }
public void Copy(LevelAttrib levelAttrib) { Level = levelAttrib.Level; Exp = levelAttrib.Exp; }