Example #1
0
        public void Copy(ActorConstraint node, Actor resetActor)
        {
            base.Copy(node, resetActor);

            m_IsEnabled = node.m_IsEnabled;
            m_Strength  = node.m_Strength;
        }
Example #2
0
        public static ActorTargetedConstraint Read(Actor actor, BinaryReader reader, ActorTargetedConstraint component)
        {
            ActorConstraint.Read(actor, reader, component);
            component.m_TargetIdx = reader.ReadUInt16();

            return(component);
        }
Example #3
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);
        }
Example #4
0
 public bool AddConstraint(ActorConstraint constraint)
 {
     if (m_Constraints == null)
     {
         m_Constraints = new List <ActorConstraint>();
     }
     if (m_Constraints.Contains(constraint))
     {
         return(false);
     }
     m_Constraints.Add(constraint);
     return(true);
 }