Esempio n. 1
0
    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;
    }
Esempio n. 2
0
 public void Disable()
 {
     _state = FogStates.Disabled;
     GetComponent <SpriteRenderer>().enabled = false;
 }
Esempio n. 3
0
 public void ExpandToRemove()
 {
     _state = FogStates.ExpandingToRemove;
     StartCoroutine("ExpandFogCompletely");
 }