private void Start()
    {
        _jawController     = FindObjectOfType <JawController>();
        _throatController  = FindObjectOfType <ThroatController>();
        _chokingController = FindObjectOfType <ChokingController>();
        _gameController    = FindObjectOfType <GameController>();

        _jawController.OnChew        += OnChewOrSwallow;
        _throatController.OnSwallow  += OnChewOrSwallow;
        _chokingController.OnChoke   += OnChoke;
        _chokingController.OnUnchoke += OnUnchoke;
    }
Ejemplo n.º 2
0
    private void Start()
    {
        _collider2D  = GetComponent <Collider2D>();
        _hotdogWidth = _collider2D.bounds.size.x;

        _gameController = FindObjectOfType <GameController>();

        _jawController         = FindObjectOfType <JawController>();
        _jawController.OnChew += GetBitten;
        _jawBitingLineX        = _jawController.GetBiteLineX();

        _hotdogSpawnerController = FindObjectOfType <HotdogSpawnerController>();

        _chokingController            = FindObjectOfType <ChokingController>();
        _chokingController.OnChoke   += () => _isChoking = true;
        _chokingController.OnUnchoke += () => _isChoking = false;
    }