private void Start() { _lantern = GameObject.Find("Lantern").GetComponent <Transform>(); _player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); _echolocateActivatedTime = Time.time; Material.SetVector("_PlayerPos", _lantern.position); Material.SetFloat("_LightDist", _echoScale); Material.SetFloat("_DarknessAlpha", 0.85f); _state = FogStates.Normal; _bIsMinimised = false; _echoScale = -3f; }
public void Disable() { _state = FogStates.Disabled; GetComponent <SpriteRenderer>().enabled = false; }
public void ExpandToRemove() { _state = FogStates.ExpandingToRemove; StartCoroutine("ExpandFogCompletely"); }