public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Double) { Time = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { Type = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { TargetIDs = new List<int>(); TList _list12 = iprot.ReadListBegin(); for( int _i13 = 0; _i13 < _list12.Count; ++_i13) { int _elem14 = 0; _elem14 = iprot.ReadI32(); TargetIDs.Add(_elem14); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { ShakeCameraFrame = new ShakeCameraFrameConfig(); ShakeCameraFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.Struct) { MoveCameraFrame = new MoveCameraFrameConfig(); MoveCameraFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.Struct) { PlayAudioFrame = new PlayAudioFrameConfig(); PlayAudioFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 101: if (field.Type == TType.Struct) { BoolFrame = new boolCommonConfig(); BoolFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 102: if (field.Type == TType.Struct) { StringFrame = new stringCommonConfig(); StringFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 103: if (field.Type == TType.Struct) { MoveTransformFrame = new MoveTransformFrameConfig(); MoveTransformFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 104: if (field.Type == TType.Struct) { Vector3Frame = new Common.Auto.ThriftVector3(); Vector3Frame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 105: if (field.Type == TType.Struct) { AddNpcFrame = new AddNpcFrameConfig(); AddNpcFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 106: if (field.Type == TType.Struct) { Runtime_CreateEffect = new Runtime_CreateEffectFrameConfig(); Runtime_CreateEffect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 107: if (field.Type == TType.Struct) { Runtime_MoveEffect = new Runtime_MoveEffectFrameConfig(); Runtime_MoveEffect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 108: if (field.Type == TType.Struct) { Runtime_AttackExec = new Runtime_AttackExecFrameConfig(); Runtime_AttackExec.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 109: if (field.Type == TType.Struct) { Runtime_RemoveEffect = new Runtime_RemoveEffectFrameConfig(); Runtime_RemoveEffect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 110: if (field.Type == TType.Struct) { MovecharFrame = new MoveCharFrameConfig(); MovecharFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 111: if (field.Type == TType.Struct) { AddStateEffectFrame = new AddStateEffectFrameConfig(); AddStateEffectFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 112: if (field.Type == TType.Struct) { AddUIFrame = new AddUIFrameConfig(); AddUIFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 113: if (field.Type == TType.Struct) { RemoveUIFrame = new RemoveUIFrameConfig(); RemoveUIFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 114: if (field.Type == TType.Struct) { EntityPlayAnim = new EntityPlayAnimationConfig(); EntityPlayAnim.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 115: if (field.Type == TType.Struct) { AnimcharFrame = new AnimCharFrameConfig(); AnimcharFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 116: if (field.Type == TType.Struct) { RotcharFrame = new RotateCharFrameConfig(); RotcharFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 117: if (field.Type == TType.Struct) { RotCameraFrame = new RotateCameraFrameConfig(); RotCameraFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 118: if (field.Type == TType.Struct) { ObjTransformFrame = new ObjectTransformFrameConfig(); ObjTransformFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 119: if (field.Type == TType.Struct) { FuncMethodFrame = new FuncMethodFrameConfig(); FuncMethodFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 120: if (field.Type == TType.Struct) { StopAudioFrame = new StopAudioFrameConfig(); StopAudioFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
protected void Init() { //Window Setting m_Instance.minSize = new Vector2(WINDOW_MIN_WIDTH, WINDOW_MIN_HIEGHT); //Update Info if (null != m_ActionFrameData) { //base m_fTime = (float)m_ActionFrameData.Time; m_Config = m_ActionFrameData.MovecharFrame; //m_Config m_eCharType = m_Config.CharType; m_lstSpeedMoveList = m_Config.LstSpeedMove; //TargetNum m_nTargetNum = m_lstSpeedMoveList.Count; m_nTargetLastNum = m_nTargetNum; //LastTimePos m_lstLastTimePos = new List<Vector3>(); for (int i = 0; i < m_nTargetNum; i++) { if (m_lstSpeedMoveList[i].Target != null) { m_lstLastTimePos.Add(m_lstSpeedMoveList[i].Target.GetVector3()); } else { m_lstLastTimePos.Add(new Vector3(0, 0, 0)); } } } else { m_ActionFrameData = new ActionFrameData(); m_Config = new MoveCharFrameConfig(); m_Config.LstSpeedMove = new List<CharSpeedMove>(); } // Hint Point Source var TriggerTemplateRoot = GameObject.Find("TriggerTemplateRoot"); m_HintPointSource = TriggerTemplateRoot.transform.GetChild(0).gameObject; if (m_HintPointSource == null) { Debuger.LogError("m_HintPointSource not found"); } // Add Hint Points m_lstHintPointList = new List<GameObject>(); if (m_lstLastTimePos != null && m_lstLastTimePos.Count > 0) { for (int i = 0; i < m_lstLastTimePos.Count; ++i) { AddHintPoint(m_lstLastTimePos[i],i); } } }
private void ClearData() { // clear config if (null != m_Config) { m_Config = new MoveCharFrameConfig(); m_Config.LstSpeedMove = new List<CharSpeedMove>(); } // clear TargetList if (null != m_lstSpeedMoveList) { m_lstSpeedMoveList = new List<CharSpeedMove>(); } ClearHintPoint(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Double) { Time = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { Type = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { TargetIDs = new List <int>(); TList _list12 = iprot.ReadListBegin(); for (int _i13 = 0; _i13 < _list12.Count; ++_i13) { int _elem14 = 0; _elem14 = iprot.ReadI32(); TargetIDs.Add(_elem14); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { ShakeCameraFrame = new ShakeCameraFrameConfig(); ShakeCameraFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.Struct) { MoveCameraFrame = new MoveCameraFrameConfig(); MoveCameraFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.Struct) { PlayAudioFrame = new PlayAudioFrameConfig(); PlayAudioFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 101: if (field.Type == TType.Struct) { BoolFrame = new boolCommonConfig(); BoolFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 102: if (field.Type == TType.Struct) { StringFrame = new stringCommonConfig(); StringFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 103: if (field.Type == TType.Struct) { MoveTransformFrame = new MoveTransformFrameConfig(); MoveTransformFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 104: if (field.Type == TType.Struct) { Vector3Frame = new Common.Auto.ThriftVector3(); Vector3Frame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 105: if (field.Type == TType.Struct) { AddNpcFrame = new AddNpcFrameConfig(); AddNpcFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 106: if (field.Type == TType.Struct) { Runtime_CreateEffect = new Runtime_CreateEffectFrameConfig(); Runtime_CreateEffect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 107: if (field.Type == TType.Struct) { Runtime_MoveEffect = new Runtime_MoveEffectFrameConfig(); Runtime_MoveEffect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 108: if (field.Type == TType.Struct) { Runtime_AttackExec = new Runtime_AttackExecFrameConfig(); Runtime_AttackExec.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 109: if (field.Type == TType.Struct) { Runtime_RemoveEffect = new Runtime_RemoveEffectFrameConfig(); Runtime_RemoveEffect.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 110: if (field.Type == TType.Struct) { MovecharFrame = new MoveCharFrameConfig(); MovecharFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 111: if (field.Type == TType.Struct) { AddStateEffectFrame = new AddStateEffectFrameConfig(); AddStateEffectFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 112: if (field.Type == TType.Struct) { AddUIFrame = new AddUIFrameConfig(); AddUIFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 113: if (field.Type == TType.Struct) { RemoveUIFrame = new RemoveUIFrameConfig(); RemoveUIFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 114: if (field.Type == TType.Struct) { EntityPlayAnim = new EntityPlayAnimationConfig(); EntityPlayAnim.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 115: if (field.Type == TType.Struct) { AnimcharFrame = new AnimCharFrameConfig(); AnimcharFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 116: if (field.Type == TType.Struct) { RotcharFrame = new RotateCharFrameConfig(); RotcharFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 117: if (field.Type == TType.Struct) { RotCameraFrame = new RotateCameraFrameConfig(); RotCameraFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 118: if (field.Type == TType.Struct) { ObjTransformFrame = new ObjectTransformFrameConfig(); ObjTransformFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 119: if (field.Type == TType.Struct) { FuncMethodFrame = new FuncMethodFrameConfig(); FuncMethodFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 120: if (field.Type == TType.Struct) { StopAudioFrame = new StopAudioFrameConfig(); StopAudioFrame.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }