Exemple #1
0
    void Start()
    {
        var player = GameObject.FindGameObjectWithTag(GameTags.Player);

        _trackedObject = player.transform;
        _bac           = player.GetComponent <BloodAlcohol>();
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        _image = GetComponent <Image>();
        _bac   = bacObject.GetComponent <BloodAlcohol>();

        _bac.OnDrink.AddListener(() => _image.fillAmount = _bac.Current);
    }
Exemple #3
0
 void Start()
 {
     _health         = GetComponent <Health>();
     _bac            = GetComponent <BloodAlcohol>();
     _combat         = GetComponent <PlayerCombat>();
     _charController = GetComponent <CharacterController>();
     _animator       = GetComponentInChildren <Animator>();
     _sfx            = GameObject.FindGameObjectWithTag(GameTags.Music).GetComponent <SfxManager>();
     _health.OnDeath.AddListener(Die);
 }