Beispiel #1
0
    void Awake()
    {
        _camera = Camera.main;

        lister = GetComponent <ControlPromptLister>();

        player      = GameObject.FindGameObjectWithTag("Player");
        interaction = player?.GetComponent <PlayerInteraction>();
        interaction.OnInteracted    += OnInteracted;
        interaction.OnDisinteracted += () => lister.SetActiveAll(false);
    }
Beispiel #2
0
 void Awake()
 {
     _camera = Camera.main;
     lister  = GetComponent <ControlPromptLister>();
 }