//private float m_fTickTime;

    public MoveCameraFrame(ActionPlayer action, ActionFrameData data)
        : base(action, data)
    {
        m_Config = m_FrameData.MoveCameraFrame;
    }
Beispiel #2
0
        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();
        }
 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()
    {
        if (null != m_ActionFrameData)
        {
            m_fTime = (float)m_ActionFrameData.Time;
            m_Config = m_ActionFrameData.MoveCameraFrame;
            if (null == m_Config.EndPos)
            {
                m_Config.EndPos = new Common.Auto.ThriftVector3();
            }
            if (null == m_Config.EndRot)
            {
                m_Config.EndRot = new Common.Auto.ThriftVector3();
            }
            m_CamPos = m_Config.EndPos.GetVector3();
            m_CamEuler = m_Config.EndRot.GetVector3();
        }
        else
        {
            m_ActionFrameData = new ActionFrameData();
            m_Config = new MoveCameraFrameConfig();

            m_Config.MoveType = EMoveCameraType.Lock;
            m_Config.IsImmediate = false;
            m_Config = new MoveCameraFrameConfig();
            m_Config.Distance = GlobalScripts.Instance.mGameCamera.Distance;
            m_Config.Height = GlobalScripts.Instance.mGameCamera.Height;
            m_Config.OffseHeight = GlobalScripts.Instance.mGameCamera.OffsetHeight;
            m_Config.Rotation = GlobalScripts.Instance.mGameCamera.Rotation;
            m_Config.PosDamping = GlobalScripts.Instance.mGameCamera.PositonDamping;
            m_Config.RotDamping = GlobalScripts.Instance.mGameCamera.RotationDamping;
            m_Config.EndPos = new Common.Auto.ThriftVector3();
            m_Config.EndRot = new Common.Auto.ThriftVector3();
            m_Config.IsOverObstacle = GlobalScripts.Instance.mGameCamera.IsOverObstacle;
        }

        m_Instance.minSize = new Vector2(WINDOW_MIN_WIDTH, WINDOW_MIN_HIEGHT);
    }