public CommandMainProgram(Hud currentHud, IRenderer<CommandMainProgram> renderer, IHudIconFactory factory) : base(currentHud) { this.renderer = renderer; IconFactory = factory; DefaultEmptyIcon = factory.EmptyIcon; for (int i = 0; i < PROGRAM_SIZE; i++) { IconList.Add(factory.EmptyIcon); } }
public CommandBar(Hud currentHud, IRenderer<CommandBar> render, IHudIconFactory factory) : base(currentHud) { this.renderer = render; IconList.Add(factory.UpIcon); IconList.Add(factory.TurnLeftIcon); IconList.Add(factory.TurnRightIcon); IconList.Add(factory.JumpIcon); IconList.Add(factory.LightIcon); IconList.Add(factory.FunctionOneIcon); IconList.Add(factory.FunctionTwoIcon); }
public Game(IRendererFactory renderFactory) { GameMode = GameModes.Play; this.renderFactory = renderFactory; Level = new Level.Level(this, renderFactory.LevelRenderer); Robot = new Robot.Robot(this, renderFactory.RobotRenderer); HUD = new Hud(this, renderFactory.HudRenderer, renderFactory.CommandBarRenderer, renderFactory.CommandMainProgramRenderer, renderFactory.FunctionOneRenderer, renderFactory.FunctionTwoRenderer, renderFactory.HudIconFactory); MainProgram = new CommandList(this); FunctionOneCommands = new CommandList(this); FunctionTwoCommands = new CommandList(this); CommandFactory.GameHandler = this; Position = new RobotPosition(this); }
public void Render(Hud obj) { setUp(obj.HudWidth, obj.HudHeight); obj.CommandBar.Render(); obj.MainProgram.Render(); obj.FunctionOne.Render(); obj.FunctionTwo.Render(); if (obj.GrabbedIcon != null) { obj.GrabbedIcon.Render(obj.GrabbedIcon); } LabelBox dialog = new LabelBox(obj.HudWidth, obj.HudHeight, new RectangleF(obj.HudWidth - 500, obj.HudHeight - 100, 500, 100)); dialog.Render(obj.Message.FirstLine + "\n" + obj.Message.SecondLine); tearDown(); }
public CommandFunction(Hud currentHud, IRenderer<CommandFunction> renderer, IHudIconFactory factory) : base(currentHud) { this.renderer = renderer; this.IconFactory = factory; }
public CommandHolder(Hud currentHud) : base(currentHud) { }
protected CommandView(Hud currentHud) : base(currentHud) { }