コード例 #1
0
        public override void Deserialize(MoDeserializer archive)
        {
            byte data = archive.ReadByte();

            IsVisible       = (data & 1) == 1;
            Opacity         = (float)((100 - (data >> 1)) / 100.0);
            ExternalParent  = new BoneReference(archive.ReadInt32(), archive.ReadInt32());
            Position        = archive.Deserialize <Vector3Wrapper>().Value;
            Rotation        = archive.Deserialize <Vector3Wrapper>().Value;
            Scale           = archive.ReadSingle();
            IsShadowEnabled = archive.ReadByte() == 1;
        }
コード例 #2
0
ファイル: Camera.cs プロジェクト: kyapp69/Scallion
        internal override void DeserializeKeyFrameValue(MoDeserializer archive)
        {
            Distance             = -archive.ReadSingle();
            Value                = new CameraState();
            Value.CenterPosition = archive.Deserialize <Vector3Wrapper>().Value;
            var r = archive.Deserialize <Vector3Wrapper>().Value;

            Value.Rotation             = new Vector3(-r.X, r.Y, r.Z);
            FollowingBone              = new BoneReference(archive.ReadInt32(), archive.ReadInt32());
            Interpolation              = archive.Deserialize <CameraInterpolationImpl>();
            Value.IsPerspectiveEnabled = archive.ReadByte() == 0;
            AngleOfView = archive.ReadInt32();
        }
コード例 #3
0
 public override void Deserialize(MoDeserializer archive)
 {
     CurrentKeyFrameIndex = archive.ReadInt32();
     NextKeyFrameIndex    = archive.ReadInt32();
     ExternalParent       = new BoneReference(archive.ReadInt32(), archive.ReadInt32());
 }