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


C# BoardManager.run方法代码示例

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


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

示例1: Start

// Use this for initialization
		void Start ()
		{
		
		
				
				difficulty = GameObject.Find ("Difficulty").GetComponent<DifficultyScript> ().getDifficulty ();
			
				GameObject.Find ("NormalButton").GetComponent<DifficultyButtonScript> ().setState (Enums.SelectorState.Blocked);
				GameObject.Find ("HardButton").GetComponent<DifficultyButtonScript> ().setState (Enums.SelectorState.Blocked);
				GameObject.Find ("ExpertButton").GetComponent<DifficultyButtonScript> ().setState (Enums.SelectorState.Blocked);
				GameObject.Find ("Back").GetComponent<BackScript> ().setState (Enums.SelectorState.Blocked);
		
				Vector3 scale = GameObject.Find ("Selector").GetComponent<Transform> ().localScale;
				scale.x = 0.5F; 
				scale.y = 0.5F; 
				GameObject.Find ("Selector").GetComponent<Transform> ().localScale = scale;
			
				switch (difficulty) {
				case 1:
				
				 //ANDROID
						GameObject.Find ("Main Camera").GetComponent<Camera> ().orthographicSize = 4.7F;
						GameObject.Find ("Hand Camera").GetComponent<Camera> ().orthographicSize = 4.7F;
						GameObject.Find ("Selector").GetComponent<Transform> ().Translate (new Vector3 (0, 4f, 0), Space.World);
						GameObject.Find ("Quit").GetComponent<Transform> ().Translate (new Vector3 (0, 4f, 0), Space.World);
						GameObject.Find ("Back").GetComponent<Transform> ().Translate (new Vector3 (0, 4f, 0), Space.World);
						break;
				case 2:
						GameObject.Find ("Main Camera").GetComponent<Camera> ().orthographicSize = 5.4F;
						GameObject.Find ("Hand Camera").GetComponent<Camera> ().orthographicSize = 5.4F;
						GameObject.Find ("Selector").GetComponent<Transform> ().Translate (new Vector3 (0, 4f, 0), Space.World);
						GameObject.Find ("Quit").GetComponent<Transform> ().Translate (new Vector3 (0, 4f, 0), Space.World);
						GameObject.Find ("Back").GetComponent<Transform> ().Translate (new Vector3 (0, 4f, 0), Space.World);
						break;
				case 3:
						GameObject.Find ("Main Camera").GetComponent<Camera> ().orthographicSize = 5.4F;
						GameObject.Find ("Hand Camera").GetComponent<Camera> ().orthographicSize = 5.4F;
						GameObject.Find ("Selector").GetComponent<Transform> ().Translate (new Vector3 (0, 4.8F, 0), Space.World);
						GameObject.Find ("Quit").GetComponent<Transform> ().Translate (new Vector3 (0, 4.8f, 0), Space.World);
						GameObject.Find ("Back").GetComponent<Transform> ().Translate (new Vector3 (0, 4.8f, 0), Space.World);
						break;
				
				
				}
		
		
		
				// Generating the random map with a given difficulty.
				mapCreator = new MapCreator (difficulty);
	
				// Retrieving the BoardManager.
				boardManager = GetComponent<BoardManager> ();
	
				// Retrieving the hand.
				hand = GameObject.Find ("Hand").GetComponent<HandPrefabScript> ();
	
				// Drawing the tiles of the board on the screen.
				boardManager.run (mapCreator);
	
				// Drawing the tiles of the hand on the screen.
				hand.setHand (mapCreator.getHand (), difficulty);
	
				// Setting up the moves storing.
				moves = new System.Collections.Generic.List<TileScript> ();
				targetCoord = new System.Collections.Generic.List<Coordinate> ();
				targetEntr = new System.Collections.Generic.List<int> ();
				targetPos = new System.Collections.Generic.List<Vector3> ();
		
				// Starting the game.
				startGame ();
	
					
		}
开发者ID:PabloA-C,项目名称:HexPuzzle,代码行数:74,代码来源:PuzzleManager.cs


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