• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UIPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Start

    // Use this for initialization
    void Start()
    {
        meetingListPage = GameObject.Find("mainPannel").GetComponent<UIPanel>();
        grid = meetingListPage.GetComponentInChildren<UIGrid>();

        this.initFakeData();
    }
开发者ID:henrybit,项目名称:GroupJoinUs,代码行数:8,代码来源:MeetingList.cs


示例2: Awake

 private void Awake()
 {
     this.mTrans = base.transform;
     this.mPanel = base.GetComponent<UIPanel>();
     if (this.mPanel.clipping == UIDrawCall.Clipping.None)
     {
         this.mPanel.clipping = UIDrawCall.Clipping.Invisible;
     }
     if ((this.movement != Movement.Custom) && (this.scale.sqrMagnitude > 0.001f))
     {
         if ((this.scale.x == 1f) && (this.scale.y == 0f))
         {
             this.movement = Movement.Horizontal;
         }
         else if ((this.scale.x == 0f) && (this.scale.y == 1f))
         {
             this.movement = Movement.Vertical;
         }
         else if ((this.scale.x == 1f) && (this.scale.y == 1f))
         {
             this.movement = Movement.Unrestricted;
         }
         else
         {
             this.movement = Movement.Custom;
             this.customMovement.x = this.scale.x;
             this.customMovement.y = this.scale.y;
         }
         this.scale = Vector3.zero;
     }
     if (Application.isPlaying)
     {
         this.mPanel.onChange = (UIPanel.OnChangeDelegate) Delegate.Combine(this.mPanel.onChange, new UIPanel.OnChangeDelegate(this.OnPanelChange));
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:35,代码来源:UIScrollView.cs


示例3: Start

 void Start()
 {
     state = GetComponent<StateMachineState>();
     panel = GetComponent<UIPanel>();
     state.Enter += Enter;
     state.Exit += Exit;
 }
开发者ID:horsman,项目名称:shieldlord,代码行数:7,代码来源:GUIOnState.cs


示例4: InitObject

	void InitObject()
	{
		if(boxCollider == null)
			boxCollider = transform.GetComponent<BoxCollider>();
		if(panel == null)
			panel = transform.GetComponent<UIPanel>();
	}
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:7,代码来源:UIArithmeticTipsManager.cs


示例5: Start

 private void Start()
 {
     if(command == MenuAction.back)
     {
         panel = gameObject.transform.parent.gameObject.GetComponent<UIPanel>();
     }
 }
开发者ID:Jetblacktsunami,项目名称:CSE455-Salvage,代码行数:7,代码来源:DebugCommands.cs


示例6: Awake

        void Awake()
        {
            m_Panel = GetComponent<UIPanel>();

            string[] spritenames = {
                "symbol_001",
                "symbol_002",
                "symbol_003",
                "symbol_004",
                "symbol_005",
                "symbol_006",
                "symbol_007",
                "symbol_008",
                "symbol_009",
                "symbol_010"
            };

            spriteNames = spritenames;

            m_slotLines = new SlotLine[5];
            SlotLines = new SlotLine[5];

            for (int i = 0; i < 5; i++)
            {
                SlotLines[i] = GameObject.Find("SLOTLINE_" + (i + 1)).GetComponent<SlotLine>();
                
                SlotLines[i].onTweenFinishCB = Listener_Tween;

                SlotLines[i].onStopCB = Listener_SlotStop;
                SlotLines[i].Init(spritenames);
            }
            m_slotLines = SlotLines;
        }
开发者ID:rodgerwatercompany,项目名称:SlotMainTance,代码行数:33,代码来源:SlotMachine.cs


示例7: checkAndInit

	/// <summary>做初始設定,並傳回是否成功初始化</summary>
	private bool checkAndInit(){
		
		if(cacheGameObject == null){
			cacheGameObject = gameObject;
			if(cacheGameObject == null){
				return false;
			}
		}
		
		if(targetPanel == null){
			targetPanel = NGUITools.FindInParents<UIPanel>(transform);
			if(targetPanel == null){
				Debug.LogWarning("找不到 Panel", cacheGameObject);
				return false;
			}
		}

		if(cacheRenderer == null){
			ParticleSystem cacheParticle = cacheGameObject.GetComponent<ParticleSystem>();
			if(cacheParticle != null){
				cacheRenderer = cacheParticle.GetComponent<Renderer>();
			}else{
				cacheRenderer = cacheGameObject.GetComponent<ParticleRenderer>();
			}
			
			if(cacheRenderer == null){
				Debug.LogWarning("沒有 renderer 物件!");
				return false;
			}
		}
		return true;
	}
开发者ID:ivanchan2,项目名称:SRW_Project,代码行数:33,代码来源:AutoParticleQueue.cs


示例8: Show

	/// <summary>
	/// Show the specified window.
	/// </summary>

	static public void Show (UIPanel window)
	{
		if (mActive == window) return;

		CreateInstance();

		if (mActive != null)
		{
			mFading.Add(mActive);
			mHistory.Add(mActive);
		}

		if (mHistory.Remove(window))
		{
			mFading.Remove(window);
		}
		else if (window != null)
		{
            window.alpha = 0;
			//window. SetAlphaRecursive(0f, false);
		}

		mActive = window;
        if (mActive != null)
        {
            mActive.gameObject.SetActive(true);
        }
	}
开发者ID:huwz2015,项目名称:cloud3dview_cloudshare,代码行数:32,代码来源:UIWindow.cs


示例9: DestroyPage

 private void DestroyPage(UIPanel go)
 {
     if (go != null)
     {
         GameObject.Destroy(go.gameObject);
     }
 }
开发者ID:imlovee,项目名称:WatchRemember_Final,代码行数:7,代码来源:PageFlip.cs


示例10: Init

 public void Init()
 {
     base.transform.localPosition = new Vector3(0f, 0f, -580f);
     this.mWinBG = base.transform.Find("winBG");
     this.mCloseBtn = this.mWinBG.Find("closeBtn").gameObject;
     this.mCloseBtn.SetActive(false);
     UIEventListener expr_67 = UIEventListener.Get(this.mCloseBtn);
     expr_67.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_67.onClick, new UIEventListener.VoidDelegate(this.OnCloseBtnClicked));
     UIEventListener expr_93 = UIEventListener.Get(base.gameObject);
     expr_93.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_93.onClick, new UIEventListener.VoidDelegate(this.OnCloseBtnClicked));
     this.mFinishFarm = this.mWinBG.Find("finish").gameObject;
     this.mFinishFarm.SetActive(false);
     UIEventListener expr_E6 = UIEventListener.Get(this.mFinishFarm);
     expr_E6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_E6.onClick, new UIEventListener.VoidDelegate(this.OnCloseBtnClicked));
     UIEventListener expr_121 = UIEventListener.Get(base.transform.Find("FadeBG").gameObject);
     expr_121.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_121.onClick, new UIEventListener.VoidDelegate(this.OnCloseBtnClicked));
     this.panel = this.mWinBG.FindChild("bagPanel").GetComponent<UIPanel>();
     this.mFarmTable = this.panel.transform.Find("bagContents").gameObject.AddComponent<PillageFarmUITable>();
     this.mFarmTable.maxPerLine = 1;
     this.mFarmTable.arrangement = UICustomGrid.Arrangement.Vertical;
     this.mFarmTable.cellWidth = 486f;
     this.mFarmTable.cellHeight = 130f;
     this.mFarmTable.gapHeight = 0f;
     this.mFarmTable.gapWidth = 0f;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:25,代码来源:GUIPillageFarm.cs


示例11: Init

 public static void Init(GameAreaInfoPanel g)
 {
     m_AreaIndex = g.GetType().GetField("m_AreaIndex", BindingFlags.NonPublic | BindingFlags.Instance);
        m_FullscreenContainer = UIView.Find("FullScreenContainer");
        m_Title = g.Find<UILabel>("Title");
        m_BuildableArea = g.Find<UILabel>("BuildableArea");
        m_Price = g.Find<UILabel>("Price");
        m_PurchasePanel = g.Find<UIPanel>("PurchasePanel");
        m_OilResources = g.Find<UIProgressBar>("ResourceBarOil");
        m_OreResources = g.Find<UIProgressBar>("ResourceBarOre");
        m_ForestryResources = g.Find<UIProgressBar>("ResourceBarForestry");
        m_FertilityResources = g.Find<UIProgressBar>("ResourceBarFarming");
        m_OilNoResources = g.Find("ResourceOil").Find<UISprite>("NoNoNo");
        m_OreNoResources = g.Find("ResourceOre").Find<UISprite>("NoNoNo");
        m_ForestryNoResources = g.Find("ResourceForestry").Find<UISprite>("NoNoNo");
        m_FertilityNoResources = g.Find("ResourceFarming").Find<UISprite>("NoNoNo");
        m_Water = g.Find<UISprite>("Water");
        m_NoWater =m_Water.Find<UISprite>("NoNoNo");
        m_Highway = g.Find<UISprite>("Highway");
        m_NoHighway =m_Highway.Find<UISprite>("NoNoNo");
        m_InHighway =m_Highway.Find<UISprite>("Incoming");
        m_OutHighway =m_Highway.Find<UISprite>("Outgoing");
        m_Train = g.Find<UISprite>("Train");
        m_NoTrain =m_Train.Find<UISprite>("NoNoNo");
        m_InTrain =m_Train.Find<UISprite>("Incoming");
        m_OutTrain =m_Train.Find<UISprite>("Outgoing");
        m_Ship = g.Find<UISprite>("Ship");
        m_NoShip =m_Ship.Find<UISprite>("NoNoNo");
        m_InShip =m_Ship.Find<UISprite>("Incoming");
        m_OutShip =m_Ship.Find<UISprite>("Outgoing");
        m_Plane = g.Find<UISprite>("Plane");
        m_NoPlane =m_Plane.Find<UISprite>("NoNoNo");
        m_InPlane =m_Plane.Find<UISprite>("Incoming");
        m_OutPlane = m_Plane.Find<UISprite>("Outgoing");
 }
开发者ID:EmperorOfDoom,项目名称:cities-skylines-unlimiter-1,代码行数:35,代码来源:FakeGameAreaInfoPanel.cs


示例12: Start

	void Start()
	{
		_uiPanel = GetComponent<UIPanel>();
		_uiScrollView = GetComponent<UIScrollView>();
		if(_uiScrollView != null)
			_originalUiScrollViewMomentum = _uiScrollView.currentMomentum;
	}
开发者ID:odasaburo,项目名称:ActiveLife,代码行数:7,代码来源:BoundObjectsHeight.cs


示例13: Awake

 private void Awake()
 {
     panelCached = ScrollView.GetComponentInChildren<UIPanel>();
     gridCached = ScrollView.GetComponentInChildren<UIGrid>();
     ScrollView.onDragFinished += OnDragFinished;
     restrictWithinPanelCached = ScrollView.restrictWithinPanel;
 }
开发者ID:wuxin0602,项目名称:Nothing,代码行数:7,代码来源:ScrollBackWhenNotFull.cs


示例14: Awake

    public override void Awake()
    {
        base.Awake();

        _UIPanelReceiver = GetComponent<UIPanel>();
		_sprite = GetComponent<UISprite> ();
    }
开发者ID:StarkTT,项目名称:TestTask,代码行数:7,代码来源:NguiAlphaBinding.cs


示例15: CreateObjects

 private void CreateObjects()
 {
     this.mPanel = base.gameObject.GetComponent<UIPanel>();
     this.mBG = GameUITools.FindGameObject("BG", base.gameObject);
     this.mTitle = GameUITools.FindUILabel("Title", this.mBG);
     this.mTeamCombat = GameUITools.FindUILabel("TeamCombat", this.mBG);
     this.mRecommendCombat = GameUITools.FindUILabel("RecommendCombat", this.mBG);
     GameUITools.FindUILabel("Times/Value", this.mBG).text = (GameConst.GetInt32(125) - Globals.Instance.Player.Data.MGCount).ToString();
     this.mRewards = GameUITools.FindGameObject("Rewards", this.mBG);
     this.mPending = GameUITools.FindGameObject("Pending", this.mBG).AddComponent<GUIGuardReadyPopUp.PendingPetFragment>();
     this.mPending.Init();
     GameObject gameObject = GameUITools.FindGameObject("Levels", this.mBG);
     int num = 0;
     while (num < 3 && num < gameObject.transform.childCount)
     {
         this.mLevelItems[num] = gameObject.transform.GetChild(num).gameObject.AddComponent<GUIGuardReadyPopUp.LevelItem>();
         this.mLevelItems[num].Init(num, new EventDelegate.Callback(this.RefreshInfo));
         num++;
     }
     GameUITools.RegisterClickEvent("FadeBG", new UIEventListener.VoidDelegate(this.OnCloseClick), base.gameObject);
     GameUITools.RegisterClickEvent("CloseBtn", new UIEventListener.VoidDelegate(this.OnCloseClick), this.mBG);
     GameUITools.RegisterClickEvent("TeamBtn", new UIEventListener.VoidDelegate(this.OnTeamClick), this.mBG);
     GameUITools.RegisterClickEvent("StartBtn", new UIEventListener.VoidDelegate(this.OnStartBtnClick), this.mBG);
     this.mFarmBtn = GameUITools.RegisterClickEvent("FarmBtn", new UIEventListener.VoidDelegate(this.OnFarmBtnClick), this.mBG);
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:25,代码来源:GUIGuardReadyPopUp.cs


示例16: Start

        private void Start()
        {
            m_Container = (UIScrollablePanel)typeof(DecorationPropertiesPanel).GetField("m_Container", BindingFlags.GetField | BindingFlags.SetField | BindingFlags.NonPublic | BindingFlags.Instance)
                .GetValue(UIView.Find<UIPanel>("DecorationProperties").GetComponent<DecorationPropertiesPanel>());

            m_SizePanel = (UIPanel)typeof(DecorationPropertiesPanel).GetField("m_SizePanel", BindingFlags.GetField | BindingFlags.SetField | BindingFlags.NonPublic | BindingFlags.Instance)
                .GetValue(UIView.Find<UIPanel>("DecorationProperties").GetComponent<DecorationPropertiesPanel>());
        }
开发者ID:akira-ishizaki,项目名称:Cities-Skylines-Mod_Lang_JAEX,代码行数:8,代码来源:DecorationPropertiesPanelTranslator.cs


示例17: Awake

 private void Awake()
 {
     this.mPanel = base.GetComponent<UIPanel>();
     if (this.mPanel == null)
     {
         this.mWidget = base.GetComponentInChildren<UIWidget>();
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:8,代码来源:TweenAlpha.cs


示例18: FindPanel

 private void FindPanel()
 {
     this.mPanel = (this.target == null) ? null : UIPanel.Find(this.target.transform, false);
     if (this.mPanel == null)
     {
         this.restrictWithinPanel = false;
     }
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:8,代码来源:UIDragObject.cs


示例19: GoToPanel

	void GoToPanel (UIPanel targetPanel) {
		NGUITools.SetActive (startPanel.gameObject, false);
		NGUITools.SetActive (homePanel.gameObject, false);
		NGUITools.SetActive (resultPanel.gameObject, false);
		NGUITools.SetActive (storePanel.gameObject, false);
		NGUITools.SetActive (descriptionPanel.gameObject, false);
		NGUITools.SetActive (targetPanel.gameObject, true);
	}
开发者ID:CCCarrion,项目名称:Star-Counter,代码行数:8,代码来源:NGUIExample.cs


示例20: addSlider

 /// <summary>
 /// Adds a copy of the slider panel object to the extended panel.
 /// </summary>
 /// <param name="originalSliderObject">The original slider panel to add.</param>
 public void addSlider(UIPanel originalSliderObject)
 {
     UIPanel sliderObject = duplicateUIPanel(originalSliderObject);
     //sliderObject.transform.parent = this.transform;
     AttachUIComponent(sliderObject.gameObject);
     sliders.Add(sliderObject);
     slimCloseTimer.Add(-1);
 }
开发者ID:LazyFiL,项目名称:BetterBudget,代码行数:12,代码来源:BBSliderContainer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UIPanelBase类代码示例发布时间:2022-05-24
下一篇:
C# UIPanGestureRecognizer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap