当前位置: 首页>>代码示例>>C#>>正文


C# UIPanel.GetComponent方法代码示例

本文整理汇总了C#中UIPanel.GetComponent方法的典型用法代码示例。如果您正苦于以下问题:C# UIPanel.GetComponent方法的具体用法?C# UIPanel.GetComponent怎么用?C# UIPanel.GetComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIPanel的用法示例。


在下文中一共展示了UIPanel.GetComponent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitGrid

        /// <summary>
        /// Cache the scroll view and return 'false' if the scroll view is not found.
        /// </summary>
        public void InitGrid() {
            mTrans = transform;
            mPanel = NGUITools.FindInParents<UIPanel>(gameObject);
            mScroll = mPanel.GetComponent<UIScrollView>();

            if (mScroll != null) {
                mScroll.GetComponent<UIPanel>().onClipMove = OnMove;
            }

            mChildren.Clear();
            for (int i = 0; i < mTrans.childCount; ++i)
                mChildren.Add(mTrans.GetChild(i));

            // Sort the list of children so that they are in order
            mChildren.Sort(UIGrid.SortByName);

            if (mScroll == null) return;
            if (mScroll.movement == UIScrollView.Movement.Horizontal) mHorizontal = true;
            else if (mScroll.movement == UIScrollView.Movement.Vertical) mHorizontal = false;

            WrapContent();
        }
开发者ID:zhangf911,项目名称:SimpleFramework_NGUI,代码行数:25,代码来源:WrapGrid.cs

示例2: CacheScrollView

	/// <summary>
	/// Cache the scroll view and return 'false' if the scroll view is not found.
	/// </summary>

	protected bool CacheScrollView ()
	{
		mTrans = transform;
		mPanel = NGUITools.FindInParents<UIPanel>(gameObject);
		mScroll = mPanel.GetComponent<UIScrollView>();
		if (mScroll == null) return false;
		if (mScroll.movement == UIScrollView.Movement.Horizontal) mHorizontal = true;
		else if (mScroll.movement == UIScrollView.Movement.Vertical) mHorizontal = false;
		else return false;
		return true;
	}
开发者ID:289997171,项目名称:UIManager,代码行数:15,代码来源:UIWrapContent.cs

示例3: StartTween

    bool StartTween(UIPanel go, Vector3 from, Vector3 to)
    {
        if (go == null) return false;

        TweenScale tweenScale = go.GetComponent<TweenScale>();
        if (tweenScale != null)
        {
            tweenScale.from = from;
            tweenScale.to = to;
            tweenScale.ResetToBeginning();
            tweenScale.enabled = true;
        }
        return true;
    }
开发者ID:imlovee,项目名称:WatchRemember_Final,代码行数:14,代码来源:PageFlip.cs


注:本文中的UIPanel.GetComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。