public Environment(Random rng) { this.Rng = rng; this.Names = new BitsyGame.NameTable(this); this.ScriptInterpreter = new ScriptInterpreter(this); this.SceneRenderer = new SceneRenderer(this); this.DialogRenderer = new DialogRenderer(this); this.DialogBuffer = new DialogBuffer(); this.Palettes[BitsyGame.ID_DEFAULT] = new BitsyGame.Palette() { Id = BitsyGame.ID_DEFAULT, Name = BitsyGame.ID_DEFAULT, Colors = new BitsyGame.Color[] { new BitsyGame.Color(0, 0, 0), new BitsyGame.Color(255, 0, 0), new BitsyGame.Color(255, 255, 255), } }; }
public void Draw(DialogBuffer buffer, int deltaTime, IRenderSurface context) { _effectTimer += deltaTime; _context = context; this.DrawTextboxBackground(buffer); buffer.ForeachActiveChar(this.DrawChar); if (buffer.CanContinue) { this.DrawNextArrow(); } if (buffer.DidPageFinishThisFrame && this.OnPageFinish != null) { this.OnPageFinish(); } _context = null; }
private void DrawTextboxBackground(DialogBuffer buffer) { _context.FillArea(buffer.BackgroundColor, TXTBOX_LEFT_POS * BitsyGame.PIXEL_SCALE, this.GetYOrigin() * BitsyGame.PIXEL_SCALE, TXTBOX_WIDTH * BitsyGame.PIXEL_SCALE, TXTBOX_HEIGHT * BitsyGame.PIXEL_SCALE); }