本文整理汇总了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 ();
}