static void Main(string[] args) { var arguments = ArgumentParser.ParseArguments(args); RegisterComponents(); var loaderFactory = new LoaderFactory(); var newGameProvider = new LocalNewGameProvider(loaderFactory); var gameProcessor = new GameProcessor(Configuration.TickPeriod); var gamePersistence = new LocalGamePersistence(loaderFactory, Configuration.DefaultSaveDirectory); var gameRendererFactory = new GameRendererFactory(); var client = new LoopingGameClient(gameProcessor, newGameProvider, gamePersistence, gameRendererFactory, arguments.SaveFileName); client.PlayGame(arguments); }
protected override void OnEntered(object enterInformation) { Game.Cursor.IsActive = false; _gameSession = (GameSession)enterInformation; _stateChangeInformation = StateChangeInformation.Empty; //todo: reactivate 3d //var rendererType = Settings.Default.GameMode == "3D" ? GameRendererType.ThreeDe : GameRendererType.TwoDe; _gameRenderer = GameRendererFactory.CreateGameRenderer(GameRendererType.TwoDe, Game, _gameSession.CurrentLevel); _finishSlideAnimator = new Animator(); _finishSlideAnimator.AddAnimation("RotateText", new DeltaAnimation(1.0f, RotateAndSetAlphaText, false)); _finishSlideAnimator.AddAnimation("Wait", new WaitAnimation(1.5f)); _finishSlideAnimator.AddTransition("RotateText", "Wait"); _finishSlideAnimator.AnimationFinished += OnFinishSlideFinished; _finishedSprite = new Sprite(Game.Content.Load <Texture2D>("textures/headings")) { Position = new Vector2(Game.ScreenWidth * 0.5f, Game.ScreenHeight * 0.5f), Alpha = 0.0f }; }