Example #1
0
    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());
    }
Example #2
0
    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);
    }