private void Awake() { _tailGenerator = GetComponent <TailGenerator>(); _input = GetComponent <SnakeInput>(); _tail = _tailGenerator.Generate(_tailSize); SizeUpdated?.Invoke(_tail.Count); }
private void OnBonusCollected(int bonusSize) { _tail.AddRange(_tailGenerator.Generate(bonusSize)); SizeUpdated?.Invoke(_tail.Count); }