Exemple #1
0
 private void Awake()
 {
     _tailGenerator = GetComponent <TailGenerator>();
     _input         = GetComponent <SnakeInput>();
     _tail          = _tailGenerator.Generate(_tailSize);
     SizeUpdated?.Invoke(_tail.Count);
 }
Exemple #2
0
 // 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();
 }
Exemple #3
0
 private void Awake()
 {
     _tailGenerator = GetComponent <TailGenerator>();
     _snakeInput    = GetComponent <SnakeInput>();
     _tail          = _tailGenerator.GenerateStartTail(_tailSize, transform.position);
 }