Exemplo n.º 1
0
        public static ActorConstraint Read(Actor actor, BinaryReader reader, ActorConstraint component)
        {
            ActorComponent.Read(actor, reader, component);
            component.m_Strength  = reader.ReadSingle();
            component.m_IsEnabled = reader.ReadByte() == 1;

            return(component);
        }
Exemplo n.º 2
0
 public static CustomFloatProperty Read(Actor actor, BinaryReader reader, CustomFloatProperty property = null)
 {
     if (property == null)
     {
         property = new CustomFloatProperty();
     }
     ActorComponent.Read(actor, reader, property);
     property.Value = reader.ReadSingle();
     return(property);
 }
Exemplo n.º 3
0
 public static CustomBooleanProperty Read(Actor actor, BinaryReader reader, CustomBooleanProperty property = null)
 {
     if (property == null)
     {
         property = new CustomBooleanProperty();
     }
     ActorComponent.Read(actor, reader, property);
     property.Value = reader.ReadByte() == 1;
     return(property);
 }
Exemplo n.º 4
0
 public static CustomStringProperty Read(Actor actor, BinaryReader reader, CustomStringProperty property = null)
 {
     if (property == null)
     {
         property = new CustomStringProperty();
     }
     ActorComponent.Read(actor, reader, property);
     property.Value = Actor.ReadString(reader);
     return(property);
 }
Exemplo n.º 5
0
        public static ActorComponent Read(Actor actor, BinaryReader reader, ActorEvent component = null)
        {
            if (component == null)
            {
                component = new ActorEvent();
            }

            ActorComponent.Read(actor, reader, component);

            return(component);
        }
Exemplo n.º 6
0
        public static ActorJellyBone Read(Actor actor, BinaryReader reader, ActorJellyBone node = null)
        {
            if (node == null)
            {
                node = new ActorJellyBone();
            }

            // The Jelly Bone has a specialized read that doesn't go down the typical node path, this is because majority of the transform properties
            // of the Jelly Bone are controlled by the Jelly Controller and are unnecessary for serialization.
            ActorComponent.Read(actor, reader, node);
            node.m_Opacity = reader.ReadSingle();
            node.m_IsCollapsedVisibility = reader.ReadByte() == 1;
            return(node);
        }
Exemplo n.º 7
0
        public static JellyComponent Read(Actor actor, BinaryReader reader, JellyComponent node = null)
        {
            if (node == null)
            {
                node = new JellyComponent();
            }

            ActorComponent.Read(actor, reader, node);

            node.m_EaseIn       = reader.ReadSingle();
            node.m_EaseOut      = reader.ReadSingle();
            node.m_ScaleIn      = reader.ReadSingle();
            node.m_ScaleOut     = reader.ReadSingle();
            node.m_InTargetIdx  = reader.ReadUInt16();
            node.m_OutTargetIdx = reader.ReadUInt16();

            return(node);
        }
Exemplo n.º 8
0
        public static ActorNode Read(Actor actor, BinaryReader reader, ActorNode node = null)
        {
            if (node == null)
            {
                node = new ActorNode();
            }
            ActorComponent.Read(actor, reader, node);
            Actor.ReadFloat32Array(reader, node.m_Translation.Values);
            node.m_Rotation = reader.ReadSingle();
            Actor.ReadFloat32Array(reader, node.m_Scale.Values);
            node.m_Opacity = reader.ReadSingle();

            if (actor.Version >= 13)
            {
                node.m_IsCollapsedVisibility = reader.ReadByte() == 1;
            }

            return(node);
        }