Exemple #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());
    }
Exemple #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);
    }