예제 #1
0
 void Start()
 {
     allPoints    = GetComponent <AllPoints>();
     finishGame   = GetComponent <FinishGame>();
     vibration    = GetComponent <Vibration>();
     levelManager = GameObject.Find("LevelManager").GetComponent <LevelManager>();
     if (levelManager == null)
     {
         Debug.Log("The game object -LevelManager- not find in scene");
     }
     timeController = GameObject.Find("TimeController").GetComponent <TimeController>();
     if (timeController == null)
     {
         Debug.Log("The game object -TimeController- not find in scene");
     }
     moneyCollect = GetComponent <MoneyCollect>();
     if (moneyCollect == null)
     {
         Debug.Log("The game object -PointsController- not find in scene");
     }
     alertButton = GameObject.Find("LevelManager").GetComponent <AlertButton>();
     if (alertButton == null)
     {
         Debug.Log("The object -LevelManager- Dont find in scene");
     }
     finishAnimation = GameObject.Find("LevelManager").GetComponent <FinishAnimationController>();
 }
예제 #2
0
 private void Start()
 {
     endGame         = GetComponent <EndGame>();
     levelManager    = GameObject.Find("LevelManager").GetComponent <LevelManager>();
     finishAnimation = GameObject.Find("LevelManager").GetComponent <FinishAnimationController>();
     timeController  = GameObject.Find("TimeController").GetComponent <TimeController>();
     vibration       = GetComponent <Vibration>();
     musicController = GameObject.Find("LevelManager").GetComponent <MusicController>();
 }