Exemplo n.º 1
0
        /// <summary>Initializes the struct with default values.</summary>
        public static LimitLinear Default()
        {
            LimitLinear value = new LimitLinear();

            value.extent      = 0f;
            value.contactDist = -1f;
            value.restitution = 0f;
            value.spring      = new Spring();

            return(value);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs a new set of GUI elements for inspecting the limit object.
        /// </summary>
        /// <param name="limit">Initial values to assign to the GUI elements.</param>
        /// <param name="layout">Layout to append the GUI elements to.</param>
        /// <param name="properties">A set of properties that are persisted by the parent inspector. Used for saving state.
        ///                          </param>
        public LimitLinearGUI(LimitLinear limit, GUILayout layout, SerializableProperties properties)
        {
            limitData = limit;

            limitExtentField.OnChanged   += x => { limitData.extent = x; MarkAsModified(); };
            limitExtentField.OnFocusLost += ConfirmModify;

            layout.AddElement(limitExtentField);
            limitCommonGUI              = new LimitCommonGUI("linear", limit.GetBase(), layout, properties);
            limitCommonGUI.OnChanged   += x => MarkAsModified();
            limitCommonGUI.OnConfirmed += ConfirmModify;
        }
Exemplo n.º 3
0
 private static extern void Internal_setLimitLinear(IntPtr thisPtr, ref LimitLinear limit);
Exemplo n.º 4
0
 private static extern void Internal_getLimitLinear(IntPtr thisPtr, out LimitLinear __output);