2024-02-28 18:25:06 +01:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class KeyPanelLockable : Lockable
|
|
|
|
{
|
|
|
|
Material material;
|
2024-02-29 18:13:41 +01:00
|
|
|
public AudioSource reject;
|
|
|
|
public AudioSource accept;
|
|
|
|
public AudioSource puzzlecomplete;
|
|
|
|
public bool finalStep = false;
|
2024-02-28 18:25:06 +01:00
|
|
|
public override void StartUnlock(){
|
|
|
|
material = GetComponent<MeshRenderer>().material;
|
|
|
|
material.color = Color.green;
|
2024-02-29 18:13:41 +01:00
|
|
|
accept.Play();
|
|
|
|
if(finalStep){
|
|
|
|
puzzlecomplete.Play();
|
|
|
|
}
|
2024-02-28 18:25:06 +01:00
|
|
|
}
|
|
|
|
public override void FailedUnlock(){
|
2024-02-29 18:13:41 +01:00
|
|
|
reject.Play();
|
2024-02-28 18:25:06 +01:00
|
|
|
}
|
|
|
|
}
|