Exemplo n.º 1
0
        public void LoadContent()
        {
            string   exePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
            FileInfo exeInfo = new FileInfo(exePath);

            ContentFenja.Initialize(exeInfo.LastWriteTime);

#if DEBUG
            string contentPath = Path.Combine(new DirectoryInfo(Environment.CurrentDirectory).Parent.Parent.Parent.FullName, "Content");
#else
            string contentPath = Path.Combine(Environment.CurrentDirectory, @"Content");
#endif

#if DEBUG
            string[] files = null;
#else
            string filesFile;
            var    assembly     = Assembly.GetExecutingAssembly();
            var    resourceName = "LD48.Content.ContentListGenerated_do-not-edit.txt";
            using (Stream stream = assembly.GetManifestResourceStream(resourceName))
                using (StreamReader reader = new StreamReader(stream))
                {
                    filesFile = reader.ReadToEnd();
                }

            string[] files = filesFile.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
#endif

            Textures.LoadContent(gDevice, content, contentPath);
            Fonts.LoadContent(content);
            Sounds.LoadContent(content, contentPath, files);
            Music.LoadContent(content);
            DepthManager.Initialize(typeof(Depth));
            Paths.Initialize(contentPath);
        }
Exemplo n.º 2
0
        public static void Initialize(GraphicsDevice gDevice, ContentManager content)
        {
#if DEBUG
            string contentPath = Path.Combine(Calculate.GetParentPath(Environment.CurrentDirectory, 5), GameIdentity.ProjectName, "Content");
            ContentFenja.LoadRaw(typeof(Tex), contentPath, "Textures", gDevice);
#else
            ContentFenja.LoadProcessed(typeof(Tex), "Textures", content);
#endif
        }
Exemplo n.º 3
0
        public static void LoadContent(GraphicsDevice gDevice, ContentManager content, string contentPath)
        {
#if DEBUG
            ContentFenja.LoadRaw(typeof(Textures), contentPath, "Textures", gDevice);
#else
            ContentFenja.LoadProcessed(typeof(Textures), "Textures", content);
#endif

            GeneratedTextures.LoadContent();
        }
Exemplo n.º 4
0
        public static void LoadContent(ContentManager content, string contentPath, string[] files)
        {
#if DEBUG
            ContentFenja.LoadRaw(typeof(Sounds), contentPath, "Sounds", null);
#else
            ContentFenja.LoadProcessed(typeof(Sounds), "Sounds", content, files);
#endif

            textPlop.Volume     /= 4f;
            engineLoop.Volume   *= 0.5f;
            carDriveAway.Volume *= 0.5f;
            kickCar.Volume      *= 2f;
            kickAir.Volume      *= 0.5f;
            loose.Volume        *= 2f;
        }
Exemplo n.º 5
0
 public static void LoadContent(ContentManager content)
 {
     ContentFenja.LoadProcessed(typeof(Fonts), "Fonts", content);
 }
Exemplo n.º 6
0
 public static void Dispose()
 {
     ContentFenja.DisposeContent(typeof(Sounds));
 }
Exemplo n.º 7
0
 public static void Dispose()
 {
     ContentFenja.DisposeContent(typeof(Textures));
 }