예제 #1
0
        void Init(LevelLogic levelLogic, FoodSpawner foodSpawner)
        {
            this.levelLogic  = levelLogic;
            this.foodSpawner = foodSpawner;

            audioSource = GetComponent <AudioSource>();
        }
예제 #2
0
 private void Init(FoodSpawner spawner)
 {
     spawner.OnFoodSpawned += (GameObject food) => {
         this.food = food.transform;
     };
 }