title: Phaser - having problems referencing with "this' in starter project
body: <h2>The Problem</h2>
  <p>I am new to Phaser. I am beginning to develop my first real game, and <strong>already</strong> ran into a major roadblock. Specifically, I am getting errors related to <em><strong>&quot;this&quot;</strong></em> everywhere I turn.</p>
  <h3>My Learning Method</h3>
  <p>Before I get into the specific errors, I just want to explain my design process. Basically, find a tutorial or code snippet, and grab it and try to use it my game. By learning this way, I think I am running into problems because my coding pattern is not the same as in the tutorial or example I am trying to replicate. Some people are using extending Phaser classes, others are not using classes at all - and I think this may be the root of my problems.</p>
  <h3>'This' is my pain</h3>
  <p>Here are a few specific coding errors I am running into in my project:</p>
  <p><strong>1. Creating an on-click handler</strong>
  In my game, I will need to run a function when the scene is clicked.</p>
  <pre><code>  // in my create event
  
    this.input.on('pointerdown', function (pointer) {
        console.log(pointer);
    })
  </code></pre>
  <p><strong>Results:</strong></p>
  <p><a href="https://i.stack.imgur.com/RvTMD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RvTMD.png" alt="Input Problem" /></a></p>
  <p><strong>2. Changing the cursor</strong>
  I simply want to change the cursor.</p>
  <pre><code>    // In my create event
  
      this.input.setDefaultCursor('url(assets/cursors/hand.cur), pointer');
  </code></pre>
  <p><strong>Results:</strong></p>
  <p><a href="https://i.stack.imgur.com/ZtmLO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZtmLO.png" alt="Cursor Problem" /></a></p>
  <blockquote>
  <h2>At this point I realize something is very wrong in my coding style.</h2>
  </blockquote>
  <p>Before I get too much further, I need to figure out what I am doing wrong.</p>
  <h3>Source Code</h3>
  <pre><code>BasicGame.Game = function (game) {
  
  };
  
  var ourGame;
  
  BasicGame.Game.prototype = {
  
    create: function () {
  
      // Dont work
      //var allScenes = this.Scene.scenes;
  
      // Dont work
      this.input.setDefaultCursor('url(assets/cursors/hand.cur), pointer');
  
      // Dont work
      //this.input.on('pointerdown', function (pointer) {
        //console.log(pointer);
     // })
  
      //console.log(allScenes);
  
      // This DOES work
      this.setupText();
  
      
    },
  
    update: function () {
     
    },
  
    //---------------------------
    // CREATE RELATED FUNCTIONS
    //---------------------------
    setupText: function () {
      this.instructions = this.add.text(
        this.game.width / 4,
        this.game.height - 100,
        'Use Arrow Keys to Move, Press Z to Fire\n' +
        'JOHNNY/clicking does both', {
          font: '20px monospace',
          fill: '#fff',
          align: 'center'
        }
      );
    }
  
  
  
    //---------------------------
    // UPDATE RELATED FUNCTIONS
    //---------------------------
    
  
    
  
  };
  </code></pre>