private void Awake() { _tailGenerator = GetComponent <TailGenerator>(); _input = GetComponent <SnakeInput>(); _tail = _tailGenerator.Generate(_tailSize); SizeUpdated?.Invoke(_tail.Count); }
// Use this for initialization public void Awake() { Debug.Log("Manager"); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); generatorScript = GetComponent <TailGenerator>(); generatorScript.Start(); }
private void Awake() { _tailGenerator = GetComponent <TailGenerator>(); _snakeInput = GetComponent <SnakeInput>(); _tail = _tailGenerator.GenerateStartTail(_tailSize, transform.position); }