示例#1
0
        internal void FromBytes(BinaryReader _br)
        {
            int id = _br.ReadInt32();

            sds = CookMain.getDishData(id);

            state = (DishState)_br.ReadByte();

            time = _br.ReadSingle();

            bool b = _br.ReadBoolean();

            if (b)
            {
                if (result == null)
                {
                    result = new DishResult();
                }

                result.FromBytes(_br);
            }
            else
            {
                result = null;
            }
        }
示例#2
0
        internal void SetDishData(IList <int> _dish)
        {
            for (int i = 0; i < _dish.Count; i++)
            {
                DishData data = new DishData();

                IDishSDS sds = CookMain.getDishData(_dish[i]);

                data.sds = sds;

                dish.Add(data);
            }
        }