コード例 #1
0
ファイル: LevelController.cs プロジェクト: Link-SD/Kernmodule
 private void Start()
 {
     boidsController = FindObjectOfType <BoidsController>();
     xMin            = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width * 0.0f, 0)).x;
     xMax            = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width * 1.0f, 0)).x;
     yMin            = Camera.main.ScreenToWorldPoint(new Vector3(0, Screen.height * 0.0f)).y;
     yMax            = Camera.main.ScreenToWorldPoint(new Vector3(0, Screen.height * 1.0f)).y;
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     boidsController        = FindObjectOfType <BoidsController>();
     levelController        = FindObjectOfType <LevelController>();
     scoreText.text         = "Score: " + levelController.LevelScore.ToString();
     boidsText.text         = "Boids Alive: " + boidsController.numberOfBoids.ToString();
     CallBacks.OnEnemyDied += UpdateUI;
     CallBacks.OnSurvived  += UpdateUI;
 }