Esempio n. 1
0
 private void Start()
 {
     this.EnableDebug = false;
     string[] commandLineArgs = Environment.GetCommandLineArgs();
     string[] array           = commandLineArgs;
     for (int i = 0; i < array.Length; i++)
     {
         string a = array[i];
         if (a == "-FMODDebug")
         {
             this.EnableDebug = true;
         }
     }
     if (this.EnableDebug)
     {
         FMOD_Listener.progressValueTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
         FMOD_Listener.Fill(FMOD_Listener.progressValueTexture, new Color(0f, 1f, 0f, 0.5f));
         FMOD_Listener.progressValueTexture.Apply();
         FMOD_Listener.instanceLabelTexture = new Texture2D(64, 64, TextureFormat.ARGB32, false);
         FMOD_Listener.Fill(FMOD_Listener.instanceLabelTexture, new Color(0f, 0f, 0f, 0.5f));
         FMOD_Listener.DrawBorder(FMOD_Listener.instanceLabelTexture, new Color(0f, 0f, 0f, 0.75f));
         FMOD_Listener.instanceLabelTexture.Apply();
     }
     this.Preload();
 }
Esempio n. 2
0
    private static void CreateDebugTextures()
    {
        WaterOnTerrainSFX.cellTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        WaterOnTerrainSFX.cellTexture.SetPixel(0, 0, Color.white);
        WaterOnTerrainSFX.cellTexture.Apply();
        Color color  = new Color(1f, 1f, 1f, 0.125f);
        Color color2 = new Color(0f, 0f, 0f, 0f);

        WaterOnTerrainSFX.sourceTexture = new Texture2D(5, 5, TextureFormat.ARGB32, false);
        FMOD_Listener.Fill(WaterOnTerrainSFX.sourceTexture, new Color(1f, 1f, 1f, 0.5f));
        WaterOnTerrainSFX.sourceTexture.SetPixel(0, 0, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(0, 4, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(4, 0, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(4, 4, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(1, 2, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(2, 1, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(3, 2, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(2, 3, color);
        WaterOnTerrainSFX.sourceTexture.SetPixel(2, 2, color2);
        WaterOnTerrainSFX.sourceTexture.Apply();
        WaterOnTerrainSFX.eventTexture = new Texture2D(3, 3, TextureFormat.ARGB32, false);
        FMOD_Listener.Fill(WaterOnTerrainSFX.eventTexture, new Color(1f, 1f, 1f, 0.5f));
        WaterOnTerrainSFX.eventTexture.SetPixel(0, 0, color);
        WaterOnTerrainSFX.eventTexture.SetPixel(0, 2, color);
        WaterOnTerrainSFX.eventTexture.SetPixel(2, 0, color);
        WaterOnTerrainSFX.eventTexture.SetPixel(2, 2, color);
        WaterOnTerrainSFX.eventTexture.Apply();
    }
Esempio n. 3
0
    private void CreateDebugTextures()
    {
        AreaEmitter.lineTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.lineTexture.SetPixel(0, 0, Color.white);
        AreaEmitter.lineTexture.Apply();
        AreaEmitter.voidLineTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.voidLineTexture.SetPixel(0, 0, new Color(0.5f, 0f, 0f));
        AreaEmitter.voidLineTexture.Apply();
        AreaEmitter.occludedLineTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.occludedLineTexture.SetPixel(0, 0, Color.black);
        AreaEmitter.occludedLineTexture.Apply();
        AreaEmitter.occludedVoidLineTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.occludedVoidLineTexture.SetPixel(0, 0, new Color(0.125f, 0f, 0f));
        AreaEmitter.occludedVoidLineTexture.Apply();
        AreaEmitter.occluderBorderTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.occluderBorderTexture.SetPixel(0, 0, new Color(1f, 1f, 1f, 0.25f));
        AreaEmitter.occluderBorderTexture.Apply();
        AreaEmitter.occluderCentreTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.occluderCentreTexture.SetPixel(0, 0, new Color(0f, 0f, 0f, 0.25f));
        AreaEmitter.occluderCentreTexture.Apply();
        AreaEmitter.activeAreaTexture = new Texture2D(1, 1, TextureFormat.ARGB32, false);
        AreaEmitter.activeAreaTexture.SetPixel(0, 0, Color.green);
        AreaEmitter.activeAreaTexture.Apply();
        AreaEmitter.sourceTexture = new Texture2D(10, 10, TextureFormat.ARGB32, false);
        FMOD_Listener.Fill(AreaEmitter.sourceTexture, new Color(0f, 0f, 0f, 0f));
        AreaEmitter.DrawCross(AreaEmitter.sourceTexture, new Color(1f, 1f, 1f, 0.5f));
        AreaEmitter.sourceTexture.Apply();
        AreaEmitter.pointTexture = new Texture2D(5, 5, TextureFormat.ARGB32, false);
        FMOD_Listener.Fill(AreaEmitter.pointTexture, new Color(1f, 1f, 1f, 0.5f));
        Color color = new Color(1f, 1f, 1f, 0.25f);

        AreaEmitter.pointTexture.SetPixel(0, 0, color);
        AreaEmitter.pointTexture.SetPixel(0, 4, color);
        AreaEmitter.pointTexture.SetPixel(4, 0, color);
        AreaEmitter.pointTexture.SetPixel(4, 4, color);
        AreaEmitter.pointTexture.Apply();
        AreaEmitter.occludedPointTexture = new Texture2D(5, 5, TextureFormat.ARGB32, false);
        FMOD_Listener.Fill(AreaEmitter.occludedPointTexture, new Color(0f, 0f, 0f, 0.5f));
        color = new Color(0f, 0f, 0f, 0.25f);
        AreaEmitter.occludedPointTexture.SetPixel(0, 0, color);
        AreaEmitter.occludedPointTexture.SetPixel(0, 4, color);
        AreaEmitter.occludedPointTexture.SetPixel(4, 0, color);
        AreaEmitter.occludedPointTexture.SetPixel(4, 4, color);
        AreaEmitter.occludedPointTexture.Apply();
    }