Exemplo n.º 1
0
 IEnumerator Chaos()
 {
     while (true)
     {
         if (gm._GameState.Value == GameState.RoomSerching)
         {
             chaos = IChaos.getChaos(intensity);
         }
         yield return(new WaitForSeconds(0.1f));
     }
 }
Exemplo n.º 2
0
    private void Update()
    {
        if ((t += Time.deltaTime) > 0.1f)
        {
            t = 0;
            x = IChaos.getChaos(x);
            renderer.materials[0].SetColor("_EmissionColor", defaultColor * x);
        }

        if (active)
        {
            foreach (Renderer r in walls)
            {
                r.material.SetTextureOffset("_MainTex", new Vector2(0, y));
            }
            yt = (yt <= 0.1f) ? yt + 0.01f : 0.1f;
            y += yt;
        }
        else
        {
            yt = 0;
        }
    }