eeveeeZ

Members
  • Content count

    1
  • Joined

  • Last visited

  1. Need help!When I open my game in MightyEditor it goes to a blank screen,sending play.js now! "use strict"; window.Portal2D.state.play = { preload: function(){ console.log("loading play state"); this.player = mt.create("g4350"); this.redportal = mt.create("Redportalpng"); this.blueportal = mt.create("blueportal"); this.blocks = mt.create("block"); }, create: function(){ console.log("starting play state"); this.cursors = this.game.input.keyboard.createCursorKeys(); this.space = this.game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); this.camera.positionX =this.player.positionX; this.camera.positionY =this.player.positionY; if (this.cursors.left.isDown) { this.character.body.velocity.x = -200; this.character.scale.x = -1; } else if (this.cursors.right.isDown) { this.character.body.velocity.x = 200; this.character.scale.x = 1; } else { this.character.body.velocity.x = 0; } }, update: function(){ this.game.physics.arcade.collide(this.player, this.redportal); this.player.positionX = this.blueportal.positionX; this.player.positionY = this.blueportal.positionY; }, Blocks : function(){ this.game.physics.arcade.collide(this.player, this.blocks); } };