How to use the rot-js.Display function in rot-js

To help you get started, we’ve selected a few rot-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Larkenx / Rotten-Soup / src / assets / js / game / Game.js View on Github external
initializeMinimap() {
		/* Create a ROT.JS display for the minimap! */
		this.minimap = new ROT.Display()
		this.minimap.setOptions(this.minimapOptions)
		this.drawMiniMap()
	},
github seiyria / Roguathia / src / js / rogue / init / game.js View on Github external
constructor() {
    this.display = new ROT.Display({
      fontSize: 14,
      fontStyle: 'bold',
      font: 'Fixedsys500c',
      width: SETTINGS.screen.width,
      height: SETTINGS.screen.height
    });
    this.currentScreen = null;

    this.listeners = {};

    const bindToScreen = (event) => {
      const listener = window.addEventListener(event, (e) => {
        if(this.currentScreen === null) return;
        
        this.currentScreen.handleInput(event, e);
      });
github seiyria / Roguathia / src / js / rogue / init / game.js View on Github external
constructor() {
    this.display = new ROT.Display({
      fontSize: 14,
      fontStyle: 'bold',
      font: 'Courier New',
      width: SETTINGS.screen.width,
      height: SETTINGS.screen.height
      
    });
    this.currentScreen = null;

    const bindToScreen = (event) => {
      window.addEventListener(event, (e) => {
        if(this.currentScreen === null) return;
        
        this.currentScreen.handleInput(event, e);
      });
    };