protected virtual void OnInit()
 {
     mCd    = false;
     IsGray = UISpriteEx.ColorGray.normal;
     if (timer != null)
     {
         timer.gameObject.SetActive(mCd);
     }
     oldTime = 0;
     newTime = 0;
     if (mBoxCollider != null)
     {
         mBoxCollider.enabled = true;
     }
     if (mButton != null)
     {
         mButton.enabled = false;
         mButton.enabled = true;
     }
 }
Exemple #2
0
    protected override bool ShouldDrawProperties()
    {
        base.ShouldDrawProperties();
        SerializedProperty cg = NGUIEditorTools.DrawProperty("ColorGray", serializedObject, "isGray", GUILayout.MinWidth(20f));

        if (cg != null)
        {
            UISpriteEx.ColorGray colorMode = (UISpriteEx.ColorGray)cg.intValue;
        }
        GUILayout.Space(6f);

        SerializedProperty wm = NGUIEditorTools.DrawProperty("GrayMaterial", serializedObject, "grayMaterial", GUILayout.MinWidth(20f));

        if (wm != null)
        {
            Material ffgrayMaterial = wm.objectReferenceValue as Material;
        }
        GUILayout.Space(6f);
        return(true);
    }
 protected void SetValue(bool _value)
 {
     mCd    = _value;
     IsGray = !mCd ? UISpriteEx.ColorGray.normal : UISpriteEx.ColorGray.Gray;
 }