public RogueskivMenuRenderer(UxContext uxContext, RogueskivMenu game, string fontFile) : base(uxContext, game) { var titleFont = uxContext.GetFont(fontFile, TITLE_FONT_SIZE); var menuFont = uxContext.GetFont(fontFile, MENU_FONT_SIZE); var smallFont = uxContext.GetFont(fontFile, SMALL_FONT_SIZE); Renderers.Add(new TitleRenderer(uxContext, titleFont, smallFont)); Renderers.Add(new InstructionsRenderer(uxContext, smallFont)); Renderers.Add(new ControlsInfoRenderer(uxContext, game, smallFont)); Renderers.Add(new CustomSeedInputRenderer(uxContext, game, smallFont)); CompRenderers[typeof(MenuOptionComp)] = new MenuOptionRenderer(uxContext, game, menuFont); CompRenderers[typeof(StatsComp)] = new StatsRenderer(uxContext, smallFont); }
public RogueskivRenderer( UxContext uxContext, IGameContext gameContext, RogueskivGame game, IRogueskivUxConfig uxConfig, IRogueskivGameConfig gameConfig ) : base(uxContext, game) { RogueskivGame = game; UxContext = uxContext; UxConfig = uxConfig; PlayerPositionComp = game.Entities.GetSingleComponent <PlayerComp, CurrentPositionComp>(); var font = uxContext.GetFont(uxConfig.FontFile, FONT_SIZE); BoardTexture = uxContext.GetTexture("board.png"); var bgrRenderer = new BgrRenderer(uxContext, new Size(1920, 1440)); Renderers.Add(bgrRenderer); Renderers.Add(new BoardRenderer(uxContext, game, BoardTexture)); CompRenderers[typeof(FoodComp)] = new FoodRenderer(this, uxContext, game, BoardTexture); CompRenderers[typeof(TorchComp)] = new TorchRenderer(this, uxContext, game, BoardTexture); CompRenderers[typeof(MapRevealerComp)] = new MapRevealerRenderer(this, uxContext, game, BoardTexture); CompRenderers[typeof(AmuletComp)] = new AmuletRenderer(this, uxContext, game, BoardTexture); CompRenderers[typeof(EnemyComp)] = new EnemyRenderer(uxContext, game); CompRenderers[typeof(FOVComp)] = new FOVRenderer(uxContext); CompRenderers[typeof(PlayerComp)] = new PlayerRenderer(uxContext, game, gameConfig.PlayerRadius); CompRenderers[typeof(HealthComp)] = new HealthRenderer(uxContext); CompRenderers[typeof(TimerComp)] = new GameInfoRenderer( uxContext, gameContext, font, game.Floor, inGameTimeVisible: gameConfig.InGameTimeVisible, realTimeVisible: gameConfig.RealTimeVisible ); CompRenderers[typeof(PopUpComp)] = new PopUpRenderer(uxContext, game, font); PlayerMovementEffectPlayer = new PlayerMovementEffectPlayer(uxContext, game); EffectPlayers.Add(new BounceEffectPlayer(uxContext, game)); EffectPlayers.Add(new TorchPickedEffectPlayer(uxContext, game)); EffectPlayers.Add(new MapRevealerPickedEffectPlayer(uxContext, game)); EffectPlayers.Add(new FoodPickedEffectPlayer(uxContext, game)); EffectPlayers.Add(new WinEffectPlayer(uxContext, game)); EffectPlayers.Add(new EnemyCollidedEffectPlayer(uxContext, game)); EffectPlayers.Add(new StairsUpEffectPlayer(uxContext, game)); EffectPlayers.Add(new StairsDownEffectPlayer(uxContext, game)); EffectPlayers.Add(new DeathEffectPlayer(uxContext, game)); }
public LoadingScreenRenderer(UxContext uxContext, string fontPath) : base(uxContext, uxContext.GetFont(fontPath, LOADING_FONT_SIZE)) { }