Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using FMODUnity;
- public class Day6Sleep : MonoBehaviour
- {
- [SerializeField] private GameObject _interactable;
- [SerializeField] private int secondsToWait;
- [SerializeField] private Light interactableLight;
- [SerializeField] private StudioEventEmitter notification;
- private void Start()
- {
- StartSleepInteractCountdown();
- }
- public void StartSleepInteractCountdown()
- {
- StopAllCoroutines();
- StartCoroutine(SleepInteract());
- }
- private IEnumerator SleepInteract()
- {
- yield return new WaitForSeconds(secondsToWait);
- _interactable.SetActive(true);
- interactableLight.enabled = true;
- notification.Play();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement