Esempio n. 1
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("ScStartBattle(");
            bool          __first = true;

            if (__isset.startTime)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("StartTime: ");
                __sb.Append(StartTime);
            }
            if (SceneTransform != null && __isset.sceneTransform)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SceneTransform: ");
                __sb.Append(SceneTransform == null ? "<null>" : SceneTransform.ToString());
            }
            if (BallQueueA != null && __isset.ballQueueA)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("BallQueueA: ");
                __sb.Append(BallQueueA);
            }
            if (BallQueueB != null && __isset.ballQueueB)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("BallQueueB: ");
                __sb.Append(BallQueueB);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
Esempio n. 2
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 10:
                        if (field.Type == TType.Byte)
                        {
                            Side = iprot.ReadByte();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 20:
                        if (field.Type == TType.I32)
                        {
                            Type = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 30:
                        if (field.Type == TType.Struct)
                        {
                            FireBall = new FireBall();
                            FireBall.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 40:
                        if (field.Type == TType.Struct)
                        {
                            FireBallResponse = new FireBallResponse();
                            FireBallResponse.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 50:
                        if (field.Type == TType.Struct)
                        {
                            EraseBall = new EraseBall();
                            EraseBall.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 60:
                        if (field.Type == TType.Struct)
                        {
                            FallBall = new FallBall();
                            FallBall.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 70:
                        if (field.Type == TType.Struct)
                        {
                            BallQueue = new BallQueue();
                            BallQueue.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 80:
                        if (field.Type == TType.Struct)
                        {
                            SceneTransform = new SceneTransform();
                            SceneTransform.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 3
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("ScStartBattle");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.startTime)
         {
             field.Name = "startTime";
             field.Type = TType.I64;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(StartTime);
             oprot.WriteFieldEnd();
         }
         if (SceneTransform != null && __isset.sceneTransform)
         {
             field.Name = "sceneTransform";
             field.Type = TType.Struct;
             field.ID   = 20;
             oprot.WriteFieldBegin(field);
             SceneTransform.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (BallQueueA != null && __isset.ballQueueA)
         {
             field.Name = "ballQueueA";
             field.Type = TType.List;
             field.ID   = 30;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.I32, BallQueueA.Count));
                 foreach (int _iter6 in BallQueueA)
                 {
                     oprot.WriteI32(_iter6);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (BallQueueB != null && __isset.ballQueueB)
         {
             field.Name = "ballQueueB";
             field.Type = TType.List;
             field.ID   = 40;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.I32, BallQueueB.Count));
                 foreach (int _iter7 in BallQueueB)
                 {
                     oprot.WriteI32(_iter7);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }