Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            args = args.Select(s => s.TrimStart('-', '/').ToLower()).ToArray();
            if (args.Contains("drawtest") || args.Contains("bench") || args.Contains("b"))
            {
                Benchmark.Perform();
                return;
            }
            bool playing = true;

            while (playing)
            {
                Console.Clear();
                //Main menu
                Console.WriteLine($@"
~ Snakity ~
Highscore: {SettingsMan.Highscore}

   s - Start
   v - Settings
   b - Benchmark
   x - Exit");
                switch (Console.ReadKey().Key)
                {
                case ConsoleKey.Enter:
                case ConsoleKey.OemPlus:
                case ConsoleKey.S:
                    PlayRound();
                    while (GameOver())
                    {
                        PlayRound();
                    }
                    break;

                case ConsoleKey.Escape:
                case ConsoleKey.OemMinus:
                case ConsoleKey.Q:
                case ConsoleKey.X:
                    playing = false;
                    break;

                case ConsoleKey.V:
                case ConsoleKey.Multiply:
                    SettingsGui.Show();
                    break;

                case ConsoleKey.B:
                    Benchmark.Perform();
                    break;
                }
            }

            Console.Clear();
            Console.WriteLine("Bye");
        }
Exemplo n.º 2
0
    private void Start()
    {
        Windowed();
        Batchui        = gameObject.AddComponent <BatchUI>();
        _lastDirectory = Application.dataPath;

        HeightMap          = null;
        HdHeightMap        = null;
        DiffuseMap         = null;
        DiffuseMapOriginal = null;
        NormalMap          = null;
        MetallicMap        = null;
        SmoothnessMap      = null;
        EdgeMap            = null;
        AoMap = null;

        _propertyCompShader   = Shader.Find("Hidden/Blit_Property_Comp");
        _propertyCompMaterial = new Material(_propertyCompShader);

        Shader.SetGlobalFloat(CorrectionId, GamaCorrection);

        FullMaterial = new Material(FullMaterialRef.shader);
        FullMaterial.CopyPropertiesFromMaterial(FullMaterialRef);

        SampleMaterial = new Material(SampleMaterialRef.shader);
        SampleMaterial.CopyPropertiesFromMaterial(SampleMaterialRef);

        HeightFromDiffuseGuiScript   = HeightFromDiffuseGuiObject.GetComponent <HeightFromDiffuseGui>();
        NormalFromHeightGuiScript    = NormalFromHeightGuiObject.GetComponent <NormalFromHeightGui>();
        EdgeFromNormalGuiScript      = EdgeFromNormalGuiObject.GetComponent <EdgeFromNormalGui>();
        AoFromNormalGuiScript        = AoFromNormalGuiObject.GetComponent <AoFromNormalGui>();
        EditDiffuseGuiScript         = EditDiffuseGuiObject.GetComponent <EditDiffuseGui>();
        MetallicGuiScript            = MetallicGuiObject.GetComponent <MetallicGui>();
        SmoothnessGuiScript          = SmoothnessGuiObject.GetComponent <SmoothnessGui>();
        MaterialGuiScript            = MaterialGuiObject.GetComponent <MaterialGui>();
        _tilingTextureMakerGuiScript = TilingTextureMakerGuiObject.GetComponent <TilingTextureMakerGui>();
        _saveLoadProjectScript       = SaveLoadProjectObject.GetComponent <SaveLoadProject>();
        _settingsGuiScript           = SettingsGuiObject.GetComponent <SettingsGui>();

        _settingsGuiScript.LoadSettings();

        if (Application.platform == RuntimePlatform.WindowsEditor ||
            Application.platform == RuntimePlatform.WindowsPlayer)
        {
            _pathChar = '\\';
        }

        TestObject.GetComponent <Renderer>().material = FullMaterial;
        SetMaterialValues();

        ReflectionProbe.RenderProbe();

        HideGuiLocker.LockEmpty += LoadHideState;
    }
Exemplo n.º 3
0
        private static void Application_DisplayingOptionDialog(object sender, TabbedDialogEventArgs e)
        {
            if (_gSettings == null)
            {
                _gSettings = new SettingsGui();
            }

            _gSettings.SetComp.UpdateGui();

            var tde = new TabbedDialogExtension(_gSettings, OnOK, OnCancel, OnHelp, OnApply);

            e.AddTab(SettingsInternal.CommandGroup, tde);
        }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        instance = this;

        if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer)
        {
            pathChar = '\\';
        }
        else
        {
            pathChar = '/';
        }

        LoadSettings();
    }
Exemplo n.º 5
0
    private void Start()
    {
        Instance = this;

        LoadSettings();
    }