18 lines
467 B
C#
18 lines
467 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
// when Unlock() is called, sets locked to false for all attached Lockables
|
|
|
|
public class Unlocker : MonoBehaviour
|
|
{
|
|
public List<Lockable> attachedLockables = new List<Lockable>();
|
|
public AudioSource unlockSound;
|
|
public void Unlock(){
|
|
foreach(Lockable lockable in attachedLockables){
|
|
lockable.locked = false;
|
|
}
|
|
unlockSound.Play();
|
|
}
|
|
}
|