void Init(LevelLogic levelLogic, FoodSpawner foodSpawner) { this.levelLogic = levelLogic; this.foodSpawner = foodSpawner; audioSource = GetComponent <AudioSource>(); }
private void Init(FoodSpawner spawner) { spawner.OnFoodSpawned += (GameObject food) => { this.food = food.transform; }; }