Beispiel #1
0
 public void Parse(Proto.PlayerLittle proto)
 {
     _id     = proto.Sn;
     _name   = proto.Name;
     _gender = proto.Gender;
     _level  = proto.Level;
 }
Beispiel #2
0
        public override void Update(ToUiData data)
        {
            ToUiPlayerProperies playerData = data as ToUiPlayerProperies;

            if (playerData == null)
            {
                return;
            }

            _playerSn     = playerData.Id;
            _gender       = playerData.Gender;
            _txtName.text = playerData.Name;
        }
        public void Parse(Proto.Role proto)
        {
            if (proto.Sn > 0)
            {
                _sn = proto.Sn;
            }

            if (!string.IsNullOrEmpty(proto.Name))
            {
                _name = proto.Name;
            }

            if (proto.Gender != Proto.Gender.None)
            {
                _gender = proto.Gender;
            }

            //
            _position.x = proto.Position.X;
            _position.y = proto.Position.Y;
            _position.z = proto.Position.Z;

            Debug.Log($"role appear. proto pos:{proto.Position} pos:{_position}");
        }
Beispiel #4
0
 public void Parse(Proto.Player proto)
 {
     _sn     = proto.Sn;
     _name   = proto.Name;
     _gender = proto.Base.Gender;
 }