Esempio n. 1
0
        public static Guid ReadGuid(IDataInputStream stream)
        {
            int length = stream.ReadByte();

            byte[] bs = new byte[length];
            for (int i = 0; i < length; ++i)
            {
                bs[i] = stream.ReadByte();
            }
            return(new Guid(bs));
        }
Esempio n. 2
0
 public override void ReadFrom(IDataInputStream stream)
 {
     targetID   = stream.ReadString();
     stuntID    = stream.ReadString();
     action     = (CharacterAction)stream.ReadByte();
     isInteract = stream.ReadBoolean();
 }
Esempio n. 3
0
 public override void ReadFrom(IDataInputStream stream)
 {
     initiativeID.ReadFrom(stream);
     targetID.ReadFrom(stream);
     stuntID.ReadFrom(stream);
     action = (CharacterAction)stream.ReadByte();
 }
Esempio n. 4
0
 public void ReadFrom(IDataInputStream stream)
 {
     id.ReadFrom(stream);
     row       = stream.ReadInt32();
     col       = stream.ReadInt32();
     stagnate  = stream.ReadInt32();
     direction = (BattleMapDirection)stream.ReadByte();
 }
Esempio n. 5
0
 public void ReadFrom(IDataInputStream stream)
 {
     obj.ReadFrom(stream);
     obstacle  = stream.ReadBoolean();
     highland  = stream.ReadBoolean();
     stagnate  = stream.ReadInt32();
     direction = (BattleMapDirection)stream.ReadByte();
     actable   = stream.ReadBoolean();
     if (actable)
     {
         actableObjData.ReadFrom(stream);
     }
 }
Esempio n. 6
0
        public override void ReadFrom(IDataInputStream stream)
        {
            abilityTypeOrStuntID.ReadFrom(stream);
            isStunt = stream.ReadBoolean();
            action  = (CharacterAction)stream.ReadByte();
            dstCenter.ReadFrom(stream);
            int length = stream.ReadInt32();

            targetsID = new Identification[length];
            for (int i = 0; i < length; ++i)
            {
                targetsID[i].ReadFrom(stream);
            }
        }
Esempio n. 7
0
        public override void ReadFrom(IDataInputStream stream)
        {
            skillTypeOrStuntID = stream.ReadString();
            isStunt            = stream.ReadBoolean();
            action             = (CharacterAction)stream.ReadByte();
            dstCenter.ReadFrom(stream);
            int length = stream.ReadInt32();

            targets = new string[length];
            for (int i = 0; i < length; ++i)
            {
                targets[i] = stream.ReadString();
            }
        }
Esempio n. 8
0
 public override void ReadFrom(IDataInputStream stream)
 {
     percent = stream.ReadByte();
 }
Esempio n. 9
0
 public static CharacterAction ReadCharacterAction(IDataInputStream stream)
 {
     return((CharacterAction)stream.ReadByte());
 }
Esempio n. 10
0
 public override void ReadFrom(IDataInputStream stream)
 {
     initiativeAbilityTypeID.ReadFrom(stream);
     passiveCharacterID.ReadFrom(stream);
     actionType = (CharacterAction)stream.ReadByte();
 }
Esempio n. 11
0
 public static CheckResult ReadCheckResult(IDataInputStream stream)
 {
     return((CheckResult)stream.ReadByte());
 }
Esempio n. 12
0
        public static AnimCommand ReadStorySceneObjectCommand(IDataInputStream stream)
        {
            AnimCommand ret;
            bool        isCameraCmd = stream.ReadBoolean();
            bool        isEasedCmd  = stream.ReadBoolean();
            float       startTime   = stream.ReadSingle();

            if (isCameraCmd)
            {
                if (isEasedCmd)
                {
                    CameraAttrType attrType = (CameraAttrType)stream.ReadByte();
                    EaseType       esType   = (EaseType)stream.ReadByte();
                    float          duration = stream.ReadSingle();
                    switch (attrType)
                    {
                    case CameraAttrType.Position: {
                        var posCmd = new EaseCameraPosition();
                        posCmd.val.ReadFrom(stream);
                        ret = posCmd;
                    }
                    break;

                    case CameraAttrType.Zoom: {
                        var zoomCmd = new EaseCameraZoom();
                        zoomCmd.val = stream.ReadSingle();
                        ret         = zoomCmd;
                    }
                    break;

                    default:
                        throw new NotImplementedException();
                    }
                    var easeAttrCmd = (EaseCameraAttribute)ret;
                    easeAttrCmd.esType   = esType;
                    easeAttrCmd.duration = duration;
                }
                else
                {
                    CameraAttrType attrType = (CameraAttrType)stream.ReadByte();
                    switch (attrType)
                    {
                    case CameraAttrType.Position: {
                        var posCmd = new SetCameraPosition();
                        posCmd.val.ReadFrom(stream);
                        ret = posCmd;
                    }
                    break;

                    case CameraAttrType.Zoom: {
                        var zoomCmd = new SetCameraZoom();
                        zoomCmd.val = stream.ReadSingle();
                        ret         = zoomCmd;
                    }
                    break;

                    default:
                        throw new NotImplementedException();
                    }
                }
            }
            else
            {
                if (isEasedCmd)
                {
                    ObjectAttrType attrType = (ObjectAttrType)stream.ReadByte();
                    EaseType       esType   = (EaseType)stream.ReadByte();
                    float          duration = stream.ReadSingle();
                    switch (attrType)
                    {
                    case ObjectAttrType.Position: {
                        var posCmd = new EaseObjectPosition();
                        posCmd.val.ReadFrom(stream);
                        ret = posCmd;
                    }
                    break;

                    case ObjectAttrType.Rotation: {
                        var rotCmd = new EaseObjectRotation();
                        rotCmd.angle = stream.ReadSingle();
                        ret          = rotCmd;
                    }
                    break;

                    case ObjectAttrType.Scale: {
                        var scaleCmd = new EaseObjectScale();
                        scaleCmd.val.ReadFrom(stream);
                        ret = scaleCmd;
                    }
                    break;

                    case ObjectAttrType.Alpha: {
                        var alphaCmd = new EaseObjectAlpha();
                        alphaCmd.val = stream.ReadSingle();
                        ret          = alphaCmd;
                    }
                    break;

                    case ObjectAttrType.Tint: {
                        var tintCmd = new EaseObjectTint();
                        tintCmd.color.ReadFrom(stream);
                        ret = tintCmd;
                    }
                    break;

                    case ObjectAttrType.Sprite: {
                        var spriteCmd = new EaseObjectSprite();
                        spriteCmd.spriteIndex = stream.ReadInt32();
                        ret = spriteCmd;
                    }
                    break;

                    default:
                        throw new NotImplementedException();
                    }
                    var easeAttrCmd = (EaseObjectAttribute)ret;
                    easeAttrCmd.esType   = esType;
                    easeAttrCmd.duration = duration;
                }
                else
                {
                    ObjectAttrType attrType = (ObjectAttrType)stream.ReadByte();
                    switch (attrType)
                    {
                    case ObjectAttrType.Position: {
                        var posCmd = new SetObjectPosition();
                        posCmd.val.ReadFrom(stream);
                        ret = posCmd;
                    }
                    break;

                    case ObjectAttrType.ZIndex: {
                        var zCmd = new SetObjectZIndex();
                        zCmd.val = stream.ReadInt32();
                        ret      = zCmd;
                    }
                    break;

                    case ObjectAttrType.Rotation: {
                        var rotCmd = new SetObjectRotation();
                        rotCmd.angle = stream.ReadSingle();
                        ret          = rotCmd;
                    }
                    break;

                    case ObjectAttrType.Scale: {
                        var scaleCmd = new SetObjectScale();
                        scaleCmd.val.ReadFrom(stream);
                        ret = scaleCmd;
                    }
                    break;

                    case ObjectAttrType.Alpha: {
                        var alphaCmd = new SetObjectAlpha();
                        alphaCmd.val = stream.ReadSingle();
                        ret          = alphaCmd;
                    }
                    break;

                    case ObjectAttrType.Tint: {
                        var tintCmd = new SetObjectTint();
                        tintCmd.color.ReadFrom(stream);
                        ret = tintCmd;
                    }
                    break;

                    case ObjectAttrType.Sprite: {
                        var spriteCmd = new SetObjectSprite();
                        spriteCmd.spriteIndex = stream.ReadInt32();
                        ret = spriteCmd;
                    }
                    break;

                    default:
                        throw new NotImplementedException();
                    }
                }
            }
            ret.startTime = startTime;
            return(ret);
        }
Esempio n. 13
0
 public void ReadFrom(IDataInputStream stream)
 {
     animation = (CameraEffect.AnimateType)stream.ReadByte();
 }
Esempio n. 14
0
 public override void ReadFrom(IDataInputStream stream)
 {
     initiativeSkillTypeID = stream.ReadString();
     passiveCharacterID    = stream.ReadString();
     actionType            = (CharacterAction)stream.ReadByte();
 }
Esempio n. 15
0
 public override void ReadFrom(IDataInputStream stream)
 {
     action = (CharacterAction)stream.ReadByte();
     stunt  = stream.ReadBoolean();
 }
Esempio n. 16
0
 public static BattleMapDirection ReadBattleMapDirection(IDataInputStream stream)
 {
     return((BattleMapDirection)stream.ReadByte());
 }
Esempio n. 17
0
 public override void ReadFrom(IDataInputStream stream)
 {
     objID  = stream.ReadString();
     action = (PlayerAction)stream.ReadByte();
 }
Esempio n. 18
0
 public override void ReadFrom(IDataInputStream stream)
 {
     characterID = stream.ReadString();
     dataType    = (DataType)stream.ReadByte();
 }
Esempio n. 19
0
 public void ReadFrom(IDataInputStream stream)
 {
     animation = (CharacterViewEffect.AnimateType)stream.ReadByte();
     tint.ReadFrom(stream);
 }