Exemple #1
0
    private void Awake()
    {
        _tailGenerator = GetComponent <TailGenerator>();
        _input         = GetComponent <SnakeInput>();
        _tail          = _tailGenerator.Generator(_tailSize);

        SizeUpdated?.Invoke(_tail.Count);
    }
Exemple #2
0
 private void OnBonusCollected(int bonusSize)
 {
     _tail.AddRange(_tailGenerator.Generator(bonusSize));
     SizeUpdated?.Invoke(_tail.Count);
 }