public static GameLib getInstance(Game1 game, SpriteBatch sp) { if (lib == null) { lib = new GameLib(game, sp); lib.loadGlobalTextures(); lib.loadFonts(); } return lib; }
private GameLib(Game1 game, SpriteBatch sp) { this.game = game; textures = new Dictionary<TextureE, Texture2D>(); sounds = new Dictionary<SoundE, string>(); fonts = new Dictionary<FontE, SpriteFont>(); engine = new AudioEngine("Content/Sounds/sonidos.xgs"); waveBank = new WaveBank(engine, "Content/Sounds/Wave Bank.xwb"); soundBank = new SoundBank(engine, "Content/Sounds/Sound Bank.xsb"); this.sp = sp; }