Jump to content

VS 2013, Could not find symbol 'Phaser'


CinkoNaap
 Share

Recommended Posts

Hey guys, I am just starting with Phaser, and I have a problem at the very beginning.

I created HTML with TypeScript project in Visual Studio 2013, and created the simplest project structure:

* phaser.js and phaser.d.ts ( from dev branch )
* Application.ts ( simple game init )
* default.htm, with : 

<script src="phaser.js"></script> <script src="Application.js"></script>

And I cannot run this project, because there is an error "Could not find symbol Phaser".

I think everything is set up ok. Maybe you can lead me to my mistake?

Link to comment
Share on other sites

default.htm

<script src="phaser.js"></script><script src="Application.js"></script>

Application.ts

class SimpleGame {   constructor() {        this.game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create });    }    game: Phaser.Game;    preload() {    }    create() {    }}window.onload = () => {    var game = new SimpleGame();};

I didn't want to create anything fancy, just get the first error-free compile and run.

The problem is with refferencing to Phaser "class", like there's no source/lib path.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...