Add the ability to ask questions ABOUT the guards
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using DefaultNamespace;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
@@ -6,10 +7,22 @@ using Utils;
|
||||
public class DoorManager : MonoBehaviour, IDescribable
|
||||
{
|
||||
public string type;
|
||||
|
||||
public string mod;
|
||||
|
||||
public Material blueMaterial;
|
||||
public Material redMaterial;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
if (mod == "BLUE")
|
||||
{
|
||||
this.GetComponent<Renderer>().material = blueMaterial;
|
||||
}
|
||||
else if (mod == "RED")
|
||||
{
|
||||
this.GetComponent<Renderer>().material = redMaterial;
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -64,4 +77,13 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
{
|
||||
return "Describe " + type;
|
||||
}
|
||||
|
||||
public string GetUnknownDescription()
|
||||
{
|
||||
if (mod == "RED" || mod == "BLUE")
|
||||
{
|
||||
return $"the {mod} door";
|
||||
} // add more modification here
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user