Ejemplo n.º 1
0
        public static Offset <MyGame.MonsterExtra> Pack(FlatBufferBuilder builder, MonsterExtraT _o)
        {
            if (_o == null)
            {
                return(default(Offset <MyGame.MonsterExtra>));
            }
            var _dvec = default(VectorOffset);

            if (_o.Dvec != null)
            {
                var __dvec = _o.Dvec.ToArray();
                _dvec = CreateDvecVector(builder, __dvec);
            }
            var _fvec = default(VectorOffset);

            if (_o.Fvec != null)
            {
                var __fvec = _o.Fvec.ToArray();
                _fvec = CreateFvecVector(builder, __fvec);
            }
            return(CreateMonsterExtra(
                       builder,
                       _o.D0,
                       _o.D1,
                       _o.D2,
                       _o.D3,
                       _o.F0,
                       _o.F1,
                       _o.F2,
                       _o.F3,
                       _dvec,
                       _fvec));
        }
Ejemplo n.º 2
0
        public MonsterExtraT UnPack()
        {
            var _o = new MonsterExtraT();

            this.UnPackTo(_o);
            return(_o);
        }
Ejemplo n.º 3
0
 public void UnPackTo(MonsterExtraT _o)
 {
     _o.D0   = this.D0;
     _o.D1   = this.D1;
     _o.D2   = this.D2;
     _o.D3   = this.D3;
     _o.F0   = this.F0;
     _o.F1   = this.F1;
     _o.F2   = this.F2;
     _o.F3   = this.F3;
     _o.Dvec = new List <double>();
     for (var _j = 0; _j < this.DvecLength; ++_j)
     {
         _o.Dvec.Add(this.Dvec(_j));
     }
     _o.Fvec = new List <float>();
     for (var _j = 0; _j < this.FvecLength; ++_j)
     {
         _o.Fvec.Add(this.Fvec(_j));
     }
 }