private Assets(ContentManager content) { Assets.content = content; player = new SpriteSheet("player"); gremlins = new SpriteSheet("gremlins"); guys = new SpriteSheet("guys"); walls = new SpriteSheet("walls"); titlescreen = content.Load<Texture2D>("titlescreen"); winscreen = content.Load<Texture2D>("winscreen2"); boom = content.Load<SoundEffect>("boom"); death = content.Load<SoundEffect>("death"); gethat = content.Load<SoundEffect>("gethat"); hit = content.Load<SoundEffect>("hit"); jump = content.Load<SoundEffect>("jump"); launch = content.Load<SoundEffect>("launch"); oof = content.Load<SoundEffect>("oof"); pew = content.Load<SoundEffect>("pew"); splat = content.Load<SoundEffect>("splat"); startgame = content.Load<SoundEffect>("startgame"); assets = this; }
public static Assets init(ContentManager content) { if (assets != null) throw new InvalidOperationException("assets isn't null"); assets = new Assets(content); return assets; }