How to use the level/cells.js.Staircase function in level

To help you get started, we’ve selected a few level 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 ondras / sleeping-beauty / src / js / being / pc.js View on Github external
this.adjustStat("hp", -1);
		}

		let item = this._level.getItem(this._xy);
		if (item) {
			log.add("%A is lying here.", item);
			if (!TUTORIAL.item) {
				log.add("To pick it up, press {#fff}Enter{}.");
				TUTORIAL.item = true;
			}
			return;
		}

		if (cell instanceof cells.Door) {
			log.add("You pass through %a.", cell);
		} else if (cell instanceof cells.Staircase) {
			log.add("%A is here.", cell);
			if (!TUTORIAL.staircase) {
				TUTORIAL.staircase = true;
				log.add("To use the staircase, press {#fff}Enter{}.");
			}
		}
	}