internal void ToBytes(BinaryWriter _bw) { _bw.Write(money); _bw.Write(dish.Count); for (int i = 0; i < dish.Count; i++) { dish[i].ToBytes(_bw); } for (int i = 0; i < CookConst.WORKER_NUM; i++) { workers[i].ToBytes(_bw); } for (int i = 0; i < CookConst.RESULT_STATE.Length; i++) { DishResult dishResult = result[i]; if (dishResult != null) { _bw.Write(true); dishResult.ToBytes(_bw); } else { _bw.Write(false); } } }
internal void ToBytes(BinaryWriter _bw) { _bw.Write(sds.GetID()); _bw.Write((byte)state); _bw.Write(time); if (result != null) { _bw.Write(true); result.ToBytes(_bw); } else { _bw.Write(false); } }