public Test(GraphicsDevice gd) { test = new Selection(0, 0, new string[] { "Duck", "Fillet", "I just want to get out of here!", "LALA"}, "Testington"); Texture2DLoader tl = new Texture2DLoader(Main.ContentManager.RootDirectory + "/test.zip", true); tl.Load(); AS = new AnimatedSprite(TemporaryContent.GetTexture("dragon"), 40, 40, 100); AS.Position = new Vector2(300, 300); }
public Title() { this.Texture2DLoader = new Texture2DLoader(Main.ContentManager.RootDirectory + "/Compressed/ShooterTextures.zip", false); this.SoundEffectLoader = new Content.SoundEffectLoader(Main.ContentManager.RootDirectory + "/Compressed/ShooterSoundEffects.zip", false); LoadFunc = () => { TitleScreenTexture = Texture2D.FromStream(Main.GraphicsDevice, File.OpenRead(Main.ContentManager.RootDirectory + "/Textures/TitleScreen.dat")); if (Texture2DLoader != null) Texture2DLoader.Load(); if (SoundEffectLoader != null) SoundEffectLoader.Load(); }; LoadThread = new Thread(LoadFunc); LoadThread.Start(); }