Jump to content

flokomike
 Share

Recommended Posts

Being rather new to Phaser I have run into a problem that have halted my progressed.

The code in question is as following.

//Gun

                             this.weapon = game.add.weapon (20, 'missile');
                             this.weapon.bulletKillType = Phaser.Weapon.KILL_WORLD_BOUNDS;
                             this.weapon.bulletAngleOffset = 0;
                             this.weapon.fireAngle = 0;
                             this.weapon.bulletSpeed = 400;
                             this.weapon.fireRate = 100;
                             this.weapon.trackSprite(sprite, 90,52)

And it gives me the following error
TypeError: Phaser.Weapon is undefined

In my test project I have the exact same piece of code, the only difference is that my current project uses game states and the previous is contain in a single .js file

Anyone had a similar error and/or have a solution?

I have added the project as a .rar file in case that helps

Heli-cop hero opgave_2.rar

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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