How to use the level.Level 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 NetEase / treasures / web-server / public / js / models / area.js View on Github external
Area.prototype.initColorBox = function() {
      var skch = this.skch;
      var logicObj = new logic.Logic();
      this.scene = logicObj.getScene();

      this.gLevel = new Level({
        logic: logicObj
      });
      this.gd.setLevel(this.gLevel);
      var closure = this;

      window.onresize = function() {
        var game = document.getElementById("game");
        var width = parseInt(getComputedStyle(game).width);
        var height = parseInt(getComputedStyle(game).height);

        closure.skch.width = width;
        closure.skch.height = height;

        // pomelo.notify({route: 'area.playerHandler.changeView', width: width, height: height});
      };
    };
github NetEase / lordofpomelo / web-server / public / js / model / area.js View on Github external
pro.initColorBox = function(){
		var logicObj = new logic.Logic();
		this.scene = logicObj.getScene();

		this.gLevel = new Level({
			logic: logicObj
		});

		this.gd.setLevel(this.gLevel);
		var closure = this;

		window.onresize = function(){
			var width = parseInt(getComputedStyle(document.getElementById("m-main")).width);
			var height = parseInt(getComputedStyle(document.getElementById("m-main")).height);
			closure.skch.width = width;
			closure.skch.height = height;
			pomelo.notify('area.playerHandler.changeView',{ width:width, height:height});
		};
	};