Fix some bugs
This commit is contained in:
@@ -30,6 +30,15 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
void Start()
|
||||
{
|
||||
indicatorLight = transform.FindChildRecursive("IndicatorLight").GetComponent<LightFlickerer>();
|
||||
|
||||
//trolley problerm indicatgor
|
||||
var oneDeath = transform.FindChildRecursive("ONEDEATH");
|
||||
var manyDeath = transform.FindChildRecursive("MANYDEATH");
|
||||
oneDeath.gameObject.SetActive(false);
|
||||
manyDeath.gameObject.SetActive(false);
|
||||
|
||||
|
||||
|
||||
if (mod == "BLUE")
|
||||
{
|
||||
// this.GetComponentInChildren<Renderer>().material = blueMaterial;
|
||||
@@ -40,6 +49,19 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
// this.GetComponentInChildren<Renderer>().material = redMaterial;
|
||||
indicatorLight.initialColor = Color.red;
|
||||
}
|
||||
else if (mod == "GREEN")
|
||||
{
|
||||
// this.GetComponentInChildren<Renderer>().material = redMaterial;
|
||||
indicatorLight.initialColor = Color.green;
|
||||
}
|
||||
else if (mod == "#ONE")
|
||||
{
|
||||
oneDeath.gameObject.SetActive(true);
|
||||
}
|
||||
else if (mod == "#MANY")
|
||||
{
|
||||
manyDeath.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
focusLight = transform.FindChildRecursive("FocusLight").GetComponent<Light>();
|
||||
}
|
||||
@@ -55,7 +77,7 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
{
|
||||
focusLight.intensity += Time.deltaTime * 100;
|
||||
}
|
||||
else if (isfocussed == 0 && focusLight.intensity > 30)
|
||||
else if (isfocussed == 0 && focusLight.intensity > 60)
|
||||
{
|
||||
focusLight.intensity -= Time.deltaTime * 100;
|
||||
}
|
||||
@@ -123,14 +145,14 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
|
||||
public string GetUnknownDescription()
|
||||
{
|
||||
if (mod == "RED" || mod == "BLUE" || mod == "PLAIN")
|
||||
if (mod == "RED" || mod == "BLUE" || mod == "GREEN")
|
||||
{
|
||||
return $"the {mod} door";
|
||||
return $"the {mod.ToLower()} door";
|
||||
}
|
||||
|
||||
if (mod == "#LEFT" || mod == "#CENTER" || mod == "#RIGHT")
|
||||
{
|
||||
return $"the {mod.Replace("#","")} door";
|
||||
return $"the {mod.Replace("#","").ToLower()} door";
|
||||
}
|
||||
// add more modification here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user