Exemple #1
0
        public static bool ContainsNone <T>(this SerializedProperty arrayProperty, IList <T> values)
        {
            for (int i = 0; i < values.Count; i++)
            {
                if (arrayProperty.Contains(values[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemple #2
0
        GUIStyle GetStateStyle()
        {
            GUIStyle style = new GUIStyle("foldout");
            style.fontStyle = FontStyle.Bold;
            Color textColor = style.normal.textColor * 1.5F;

            if (Application.isPlaying) {
                textColor = currentStatesProperty.Contains(currentState) ? new Color(0, 1, 0, 10) : new Color(1, 0, 0, 10);
            }

            style.normal.textColor = textColor * 0.7F;
            style.onNormal.textColor = textColor * 0.7F;
            style.focused.textColor = textColor * 0.85F;
            style.onFocused.textColor = textColor * 0.85F;
            style.active.textColor = textColor * 0.85F;
            style.onActive.textColor = textColor * 0.85F;

            return style;
        }