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


C# UIPanel类代码示例

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


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


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