private void Start() { snakeMovement = GetComponent <SnakeMovement>(); snakeCollision = GetComponent <SnakeCollision>(); snakeTailSpawner = GetComponent <SnakeTailSpawner>(); snakeHatChooser = GetComponentInChildren <SnakeHatChooser>(); snakeMovement.Init(this); snakeCollision.Init(this); snakeTailSpawner.Init(this); snakeHatChooser.Init(GameManager.instance.GetSavedData()); }
private void Start() { snakeMovement = GetComponent <SnakeMovement>(); snakeCollision = GetComponent <SnakeCollision>(); snakeTailSpawner = GetComponent <SnakeTailSpawner>(); snakeHatChooser = GetComponentInChildren <SnakeHatChooser>(); snakeMovement.Init(this); snakeCollision.Init(this); snakeTailSpawner.Init(this); snakeHatChooser.Init(GameManager.instance.GetSavedData()); waitAfterResumeWaitForSeconds = new WaitForSeconds(waitToReviveDelay); }