protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); BlockSpriteTextureStorage.Load(this.Content); ItemSpriteTextureStorage.Load(this.Content); EnemySpriteFactory.Load(this.Content); MiscGameObjectTextureStorage.Load(this.Content); MarioSpriteFactory.Load(this.Content); GUISpriteFactory.Load(this.Content); SoundEffectFactory.Load(this.Content); MusicFactory.Load(this.Content); background = Content.Load <Texture2D>(UtilityClass.background); background2 = Content.Load <Texture2D>(UtilityClass.background2); skyworldbackground = Content.Load <Texture2D>("skyworldbackground"); deathbackground = Content.Load <Texture2D>(UtilityClass.deathbackground); font = Content.Load <SpriteFont>(UtilityClass.FontString); basicarialfont = Content.Load <SpriteFont>(UtilityClass.BasicArialFontString); LoadKeyBoardCommands(); levelStore = loader.LoadLevel(); mario = levelStore.player; cameraController = new CameraController(camera, mario); resetCommand = new ResetLevelCommand(this); MusicFactory.MainTheme(); ResetGui(); }
public void SendCorrectParametersToInitialzer(string levelId, string user) { var initializer = new MockLevelInitializer(); var command = new ResetLevelCommand(initializer); command.Execute(levelId, user); Assert.Equal(levelId, initializer.CleanedLevelId); Assert.Equal(user, initializer.CleanedUser); Assert.Equal(levelId, initializer.InitializedLevelId); Assert.Equal(user, initializer.InitializedUser); }
public void ThrowIfInvalidParametersPassed(string[] args) { var command = new ResetLevelCommand(new MockLevelInitializer()); Assert.Throws <InvalidCommandArrayException>(() => command.Execute(args)); }