private void SwitchOn() { lightOnObj.SetActive(true); lightOffObj.SetActive(false); //audio MultiSound msnd = GetComponent <MultiSound>(); if (msnd != null) { msnd.playSound(0); } }
private void CloseDoor() { openObj.SetActive(false); closedObj.SetActive(true); obstacle.enabled = true; //audio MultiSound msnd = GetComponent <MultiSound>(); if (msnd != null) { msnd.playSound(1); } }
private void OpenDoor(bool doSound) { openObj.SetActive(true); closedObj.SetActive(false); obstacle.enabled = false; //audio MultiSound msnd = GetComponent <MultiSound>(); if (msnd != null && doSound) { msnd.playSound(0); } }
private void SwitchOff() { lightOnObj.SetActive(false); lightOffObj.SetActive(true); Timer.Instance.Add(10, SwitchOn); //audio MultiSound msnd = GetComponent <MultiSound>(); if (msnd != null) { msnd.playSound(1); } }
//private void OnMouseDown() //{ // House.Instance.DoClick(this); //} public void Used() { Allowed = false; SetActive(true); Timer.Instance.Add(ReactivateTime, () => { SetActive(false); Allowed = true; }); // play sound MultiSound asrc = GetComponent <MultiSound>(); if (asrc != null) { asrc.playSound(); } }