Пример #1
0
        private void Load(IFileStore store)
        {
            var kvp = new KeyValuePairs();

            using (var reader = store.OpenTextFile(Path))
            {
                kvp.Load(reader);
            }

            BackgroundColour = kvp.GetColour("background_colour", Vector3.Zero);
            BackgroundImage  = kvp.GetString("background_image", null);
            AmbientColour    = kvp.GetColour("ambient_colour", Vector3.One);
            LightColour      = kvp.GetColour("light_colour", Vector3.Zero);
            LightDirection   = kvp.GetUnitVector("light_direction", -Vector3.UnitY);
            Light2Colour     = kvp.GetColour("light2_colour", Vector3.Zero);
            Light2Direction  = kvp.GetUnitVector("light2_direction", -Vector3.UnitY);

            ModelPath           = kvp.GetString("model", null);
            ForegroundModelPath = kvp.GetString("foreground_model", null);
            AnimPath            = kvp.GetString("animation", null);

            RenderPass           = kvp.GetEnum("render_pass", RenderPass.Opaque);
            ForegroundRenderPass = kvp.GetEnum("foreground_render_pass", RenderPass.Opaque);
            CastShadows          = kvp.GetBool("cast_shadows", false);
        }