コード例 #1
0
//	private bool revertEnableCallback( Transform tr, object args )
//	{
//		NvUIBase elem = tr.GetComponent<NvUIBase>();
//		if ( elem != null )
//		{
//			elem.revertEnable();
//			return true;
//		}
//
//		return false;
//	}
//
//	public override void revertEnable()
//	{
//		base.revertEnable();
//		enumWidgets( revertEnableCallback );
//	}


    private bool setVisibleCallback(Transform tr, object args)
    {
        bool flag = (bool)args;

        NvUIBase elem = tr.GetComponent <NvUIBase>();
        bool     ret  = false;

        if (elem != null)
        {
            elem.setVisible(flag);
            ret = true;
        }
        else
        {
            tr.gameObject.active = flag;
        }

        UIAnchor anchor = tr.GetComponent <UIAnchor>();

        if (anchor != null)
        {
            anchor.enabled = flag;
        }

        Collider col = tr.GetComponent <Collider>();

        if (col != null)
        {
            col.enabled = flag;
        }

        return(ret);
    }
コード例 #2
0
    private bool setVisibleCallback(Transform tr, object args)
    {
        bool     flag = (bool)args;
        NvUIBase elem = tr.GetComponent <NvUIBase>();

        if (elem != null)
        {
            elem.setVisible(flag);
            return(true);
        }
        else
        {
            tr.gameObject.active = flag;
            if (tr.collider != null)
            {
                tr.collider.enabled = flag;
            }
        }
        return(false);
    }
コード例 #3
0
    private bool setVisibleCallback(Transform tr, object args)
    {
        bool flag = (bool)args;

        NvUIBase elem = tr.GetComponent <NvUIBase>();

        if (elem != null && !(elem is NvUIDialogBase))
        {
            elem.setVisible(flag);
            return(true);
        }
        else if (!(elem is NvUIDialogBase))
        {
            tr.gameObject.active = flag;
        }
        else
        {
            return(true);
        }

        return(false);
    }