void Awake()
 {
     layoutPuzzleButtons = GetComponent <LayoutPuzzleButtons>();
     CreateButtons(level1Button, level1Animator, puzzleGame1);
     CreateButtons(level2Button, level2Animator, puzzleGame2);
     CreateButtons(level3Button, level3Animator, puzzleGame3);
     CreateButtons(level4Button, level4Animator, puzzleGame4);
     CreateButtons(level5Button, level5Animator, puzzleGame5);
     AssignButtonsAndAnimators();
 }
コード例 #2
0
 /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
 void Start()
 {
     puzzleGameManager         = GetComponent <PuzzleGameManager>();
     layoutPuzzleButtons       = GetComponent <LayoutPuzzleButtons>();
     levelLocker               = GameObject.Find("Puzzle Level Controller").GetComponent <LevelLocker>();
     puzzleLevelSelectAnimator = puzzleLevelSelectPanel.GetComponent <Animator>();
     puzzleGamePanelAnimator1  = puzzleGamePanel1.GetComponent <Animator>();
     puzzleGamePanelAnimator2  = puzzleGamePanel2.GetComponent <Animator>();
     puzzleGamePanelAnimator3  = puzzleGamePanel3.GetComponent <Animator>();
     puzzleGamePanelAnimator4  = puzzleGamePanel4.GetComponent <Animator>();
     puzzleGamePanelAnimator5  = puzzleGamePanel5.GetComponent <Animator>();
 }