Beispiel #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("ActionFrameData(");

            sb.Append("Time: ");
            sb.Append(Time);
            sb.Append(",Type: ");
            sb.Append(Type);
            sb.Append(",TargetIDs: ");
            sb.Append(TargetIDs);
            sb.Append(",ShakeCameraFrame: ");
            sb.Append(ShakeCameraFrame == null ? "<null>" : ShakeCameraFrame.ToString());
            sb.Append(",MoveCameraFrame: ");
            sb.Append(MoveCameraFrame == null ? "<null>" : MoveCameraFrame.ToString());
            sb.Append(",PlayAudioFrame: ");
            sb.Append(PlayAudioFrame == null ? "<null>" : PlayAudioFrame.ToString());
            sb.Append(",BoolFrame: ");
            sb.Append(BoolFrame == null ? "<null>" : BoolFrame.ToString());
            sb.Append(",StringFrame: ");
            sb.Append(StringFrame == null ? "<null>" : StringFrame.ToString());
            sb.Append(",MoveTransformFrame: ");
            sb.Append(MoveTransformFrame == null ? "<null>" : MoveTransformFrame.ToString());
            sb.Append(",Vector3Frame: ");
            sb.Append(Vector3Frame == null ? "<null>" : Vector3Frame.ToString());
            sb.Append(",AddNpcFrame: ");
            sb.Append(AddNpcFrame == null ? "<null>" : AddNpcFrame.ToString());
            sb.Append(",Runtime_CreateEffect: ");
            sb.Append(Runtime_CreateEffect == null ? "<null>" : Runtime_CreateEffect.ToString());
            sb.Append(",Runtime_MoveEffect: ");
            sb.Append(Runtime_MoveEffect == null ? "<null>" : Runtime_MoveEffect.ToString());
            sb.Append(",Runtime_AttackExec: ");
            sb.Append(Runtime_AttackExec == null ? "<null>" : Runtime_AttackExec.ToString());
            sb.Append(",Runtime_RemoveEffect: ");
            sb.Append(Runtime_RemoveEffect == null ? "<null>" : Runtime_RemoveEffect.ToString());
            sb.Append(",MovecharFrame: ");
            sb.Append(MovecharFrame == null ? "<null>" : MovecharFrame.ToString());
            sb.Append(",AddStateEffectFrame: ");
            sb.Append(AddStateEffectFrame == null ? "<null>" : AddStateEffectFrame.ToString());
            sb.Append(",AddUIFrame: ");
            sb.Append(AddUIFrame == null ? "<null>" : AddUIFrame.ToString());
            sb.Append(",RemoveUIFrame: ");
            sb.Append(RemoveUIFrame == null ? "<null>" : RemoveUIFrame.ToString());
            sb.Append(",EntityPlayAnim: ");
            sb.Append(EntityPlayAnim == null ? "<null>" : EntityPlayAnim.ToString());
            sb.Append(",AnimcharFrame: ");
            sb.Append(AnimcharFrame == null ? "<null>" : AnimcharFrame.ToString());
            sb.Append(",RotcharFrame: ");
            sb.Append(RotcharFrame == null ? "<null>" : RotcharFrame.ToString());
            sb.Append(",RotCameraFrame: ");
            sb.Append(RotCameraFrame == null ? "<null>" : RotCameraFrame.ToString());
            sb.Append(",ObjTransformFrame: ");
            sb.Append(ObjTransformFrame == null ? "<null>" : ObjTransformFrame.ToString());
            sb.Append(",FuncMethodFrame: ");
            sb.Append(FuncMethodFrame == null ? "<null>" : FuncMethodFrame.ToString());
            sb.Append(",StopAudioFrame: ");
            sb.Append(StopAudioFrame == null ? "<null>" : StopAudioFrame.ToString());
            sb.Append(")");
            return(sb.ToString());
        }
Beispiel #2
0
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("ActionFrameData");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (__isset.time)
            {
                field.Name = "time";
                field.Type = TType.Double;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                oprot.WriteDouble(Time);
                oprot.WriteFieldEnd();
            }
            if (__isset.type)
            {
                field.Name = "type";
                field.Type = TType.I32;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(Type);
                oprot.WriteFieldEnd();
            }
            if (TargetIDs != null && __isset.targetIDs)
            {
                field.Name = "targetIDs";
                field.Type = TType.List;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                {
                    oprot.WriteListBegin(new TList(TType.I32, TargetIDs.Count));
                    foreach (int _iter15 in TargetIDs)
                    {
                        oprot.WriteI32(_iter15);
                    }
                    oprot.WriteListEnd();
                }
                oprot.WriteFieldEnd();
            }
            if (ShakeCameraFrame != null && __isset.shakeCameraFrame)
            {
                field.Name = "shakeCameraFrame";
                field.Type = TType.Struct;
                field.ID   = 10;
                oprot.WriteFieldBegin(field);
                ShakeCameraFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (MoveCameraFrame != null && __isset.moveCameraFrame)
            {
                field.Name = "moveCameraFrame";
                field.Type = TType.Struct;
                field.ID   = 20;
                oprot.WriteFieldBegin(field);
                MoveCameraFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (PlayAudioFrame != null && __isset.playAudioFrame)
            {
                field.Name = "playAudioFrame";
                field.Type = TType.Struct;
                field.ID   = 30;
                oprot.WriteFieldBegin(field);
                PlayAudioFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (BoolFrame != null && __isset.boolFrame)
            {
                field.Name = "boolFrame";
                field.Type = TType.Struct;
                field.ID   = 101;
                oprot.WriteFieldBegin(field);
                BoolFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (StringFrame != null && __isset.stringFrame)
            {
                field.Name = "stringFrame";
                field.Type = TType.Struct;
                field.ID   = 102;
                oprot.WriteFieldBegin(field);
                StringFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (MoveTransformFrame != null && __isset.moveTransformFrame)
            {
                field.Name = "moveTransformFrame";
                field.Type = TType.Struct;
                field.ID   = 103;
                oprot.WriteFieldBegin(field);
                MoveTransformFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Vector3Frame != null && __isset.vector3Frame)
            {
                field.Name = "vector3Frame";
                field.Type = TType.Struct;
                field.ID   = 104;
                oprot.WriteFieldBegin(field);
                Vector3Frame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (AddNpcFrame != null && __isset.addNpcFrame)
            {
                field.Name = "addNpcFrame";
                field.Type = TType.Struct;
                field.ID   = 105;
                oprot.WriteFieldBegin(field);
                AddNpcFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Runtime_CreateEffect != null && __isset.runtime_CreateEffect)
            {
                field.Name = "runtime_CreateEffect";
                field.Type = TType.Struct;
                field.ID   = 106;
                oprot.WriteFieldBegin(field);
                Runtime_CreateEffect.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Runtime_MoveEffect != null && __isset.runtime_MoveEffect)
            {
                field.Name = "runtime_MoveEffect";
                field.Type = TType.Struct;
                field.ID   = 107;
                oprot.WriteFieldBegin(field);
                Runtime_MoveEffect.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Runtime_AttackExec != null && __isset.runtime_AttackExec)
            {
                field.Name = "runtime_AttackExec";
                field.Type = TType.Struct;
                field.ID   = 108;
                oprot.WriteFieldBegin(field);
                Runtime_AttackExec.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Runtime_RemoveEffect != null && __isset.runtime_RemoveEffect)
            {
                field.Name = "runtime_RemoveEffect";
                field.Type = TType.Struct;
                field.ID   = 109;
                oprot.WriteFieldBegin(field);
                Runtime_RemoveEffect.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (MovecharFrame != null && __isset.movecharFrame)
            {
                field.Name = "movecharFrame";
                field.Type = TType.Struct;
                field.ID   = 110;
                oprot.WriteFieldBegin(field);
                MovecharFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (AddStateEffectFrame != null && __isset.addStateEffectFrame)
            {
                field.Name = "addStateEffectFrame";
                field.Type = TType.Struct;
                field.ID   = 111;
                oprot.WriteFieldBegin(field);
                AddStateEffectFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (AddUIFrame != null && __isset.addUIFrame)
            {
                field.Name = "addUIFrame";
                field.Type = TType.Struct;
                field.ID   = 112;
                oprot.WriteFieldBegin(field);
                AddUIFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (RemoveUIFrame != null && __isset.removeUIFrame)
            {
                field.Name = "removeUIFrame";
                field.Type = TType.Struct;
                field.ID   = 113;
                oprot.WriteFieldBegin(field);
                RemoveUIFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (EntityPlayAnim != null && __isset.entityPlayAnim)
            {
                field.Name = "entityPlayAnim";
                field.Type = TType.Struct;
                field.ID   = 114;
                oprot.WriteFieldBegin(field);
                EntityPlayAnim.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (AnimcharFrame != null && __isset.animcharFrame)
            {
                field.Name = "animcharFrame";
                field.Type = TType.Struct;
                field.ID   = 115;
                oprot.WriteFieldBegin(field);
                AnimcharFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (RotcharFrame != null && __isset.rotcharFrame)
            {
                field.Name = "rotcharFrame";
                field.Type = TType.Struct;
                field.ID   = 116;
                oprot.WriteFieldBegin(field);
                RotcharFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (RotCameraFrame != null && __isset.rotCameraFrame)
            {
                field.Name = "rotCameraFrame";
                field.Type = TType.Struct;
                field.ID   = 117;
                oprot.WriteFieldBegin(field);
                RotCameraFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (ObjTransformFrame != null && __isset.objTransformFrame)
            {
                field.Name = "objTransformFrame";
                field.Type = TType.Struct;
                field.ID   = 118;
                oprot.WriteFieldBegin(field);
                ObjTransformFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (FuncMethodFrame != null && __isset.funcMethodFrame)
            {
                field.Name = "funcMethodFrame";
                field.Type = TType.Struct;
                field.ID   = 119;
                oprot.WriteFieldBegin(field);
                FuncMethodFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (StopAudioFrame != null && __isset.stopAudioFrame)
            {
                field.Name = "stopAudioFrame";
                field.Type = TType.Struct;
                field.ID   = 120;
                oprot.WriteFieldBegin(field);
                StopAudioFrame.Write(oprot);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }
Beispiel #3
0
    public static AbstractActionFrame CreateActionFrame(ActionPlayer action, ActionFrameData data)
    {
        AbstractActionFrame actionFrame = null;

        if (null == data)
        {
            return(actionFrame);
        }

        switch ((EActionFrameType)data.Type)
        {
        case EActionFrameType.ShakeCamera:
            actionFrame = new ShakeCameraFrame(action, data);
            break;

        case EActionFrameType.MoveCamera:
            actionFrame = new MoveCameraFrame(action, data);
            break;

        case EActionFrameType.PlayAudio:
            actionFrame = new PlayAudioFrame(action, data);
            break;

        case EActionFrameType.StopAudio:
            actionFrame = new StopAudioFrame(action, data);
            break;

        case EActionFrameType.AddNpc:
            actionFrame = new AddNpcFrame(action, data);
            break;

        case EActionFrameType.MoveObject:
            actionFrame = new MoveTransformFrame(action, data);
            break;

        case EActionFrameType.EnableObject:
            actionFrame = new EnableObjFrame(action, data);
            break;

        case EActionFrameType.EnableMeshRender:
            actionFrame = new EnableMeshRenderFrame(action, data);
            break;

        case EActionFrameType.ChangeColor:
            actionFrame = new ChangeColorFrame(action, data);
            break;

        case EActionFrameType.Runtime_CreateEffect:
            actionFrame = new Runtime_CreateEffectFrame(action, data);
            break;

        case EActionFrameType.Runtime_MoveEffect:
            actionFrame = new Runtime_MoveEffectFrame(action, data);
            break;

        case EActionFrameType.AddStateEffect:
            actionFrame = new AddStateEffectFrame(action, data);
            break;

        case EActionFrameType.Runtime_RemoveEffect:
            actionFrame = new Runtime_RemoveEffectFrame(action, data);
            break;

        case EActionFrameType.Runtime_AddUI:
            actionFrame = new AddUIFrame(action, data);
            break;

        case EActionFrameType.Runtime_RemoveUI:
            actionFrame = new RemoveUIFrame(action, data);
            break;

        case EActionFrameType.MoveChar:
            actionFrame = new MoveCharFrame(action, data);
            break;

        case EActionFrameType.EntityPlayAnimation:
            actionFrame = new EntityPlayAnimFrame(action, data);
            break;

        case EActionFrameType.AnimChar:
            actionFrame = new AnimCharFrame(action, data);
            break;

        case EActionFrameType.RotateChar:
            actionFrame = new RotateCharFrame(action, data);
            break;

        case EActionFrameType.RotateCamera:
            actionFrame = new RotateCameraFrame(action, data);
            break;

        case EActionFrameType.ObjTransform:
            actionFrame = new ObjectTransformFrame(action, data);
            break;

        case EActionFrameType.FuncMethod:
            actionFrame = new FuncMethodFrame(action, data);
            break;
        }
        return(actionFrame);
    }
    public static AbstractActionFrame CreateActionFrame(ActionPlayer action, ActionFrameData data)
    {
        AbstractActionFrame actionFrame = null;

        if (null == data)
        {
            return actionFrame;
        }

        switch ((EActionFrameType)data.Type)
        {
            case EActionFrameType.ShakeCamera:
                actionFrame = new ShakeCameraFrame(action, data);
                break;
            case EActionFrameType.MoveCamera:
                actionFrame = new MoveCameraFrame(action, data);
                break;
            case EActionFrameType.PlayAudio:
                actionFrame = new PlayAudioFrame(action, data);
                break;
            case EActionFrameType.StopAudio:
                actionFrame = new StopAudioFrame(action, data);
                break;
            case EActionFrameType.AddNpc:
                actionFrame = new AddNpcFrame(action, data);
                break;
            case EActionFrameType.MoveObject:
                actionFrame = new MoveTransformFrame(action, data);
                break;
            case EActionFrameType.EnableObject:
                actionFrame = new EnableObjFrame(action, data);
                break;
            case EActionFrameType.EnableMeshRender:
                actionFrame = new EnableMeshRenderFrame(action, data);
                break;
            case EActionFrameType.ChangeColor:
                actionFrame = new ChangeColorFrame(action, data);
                break;
            case EActionFrameType.Runtime_CreateEffect:
                actionFrame = new Runtime_CreateEffectFrame(action, data);
                break;
            case EActionFrameType.Runtime_MoveEffect:
                actionFrame = new Runtime_MoveEffectFrame(action, data);
                break;
            case EActionFrameType.AddStateEffect:
                actionFrame = new AddStateEffectFrame(action, data);
                break;
            case EActionFrameType.Runtime_RemoveEffect:
                actionFrame = new Runtime_RemoveEffectFrame(action, data);
                break;
            case EActionFrameType.Runtime_AddUI:
                actionFrame = new AddUIFrame(action, data);
                break;
            case EActionFrameType.Runtime_RemoveUI:
                actionFrame = new RemoveUIFrame(action, data);
                break;
            case EActionFrameType.MoveChar:
                actionFrame = new MoveCharFrame(action, data);
                break;
            case EActionFrameType.EntityPlayAnimation:
                actionFrame = new EntityPlayAnimFrame(action, data);
                break;
            case EActionFrameType.AnimChar:
                actionFrame = new AnimCharFrame(action, data);
                break;
            case EActionFrameType.RotateChar:
                actionFrame = new RotateCharFrame(action, data);
                break;
            case EActionFrameType.RotateCamera:
                actionFrame = new RotateCameraFrame(action, data);
                break;
            case EActionFrameType.ObjTransform:
                actionFrame = new ObjectTransformFrame(action, data);
                break;
            case EActionFrameType.FuncMethod:
                actionFrame = new FuncMethodFrame(action, data);
                break;
        }
        return actionFrame;
    }