Jump to content

Connormcwood

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. When in my maingame state I would like for the player to have the ability to use the ESC key and to return to the startmenu. I have attempted to do this by simply using the if keyboard.esc key is down then start state. However this state has already been previously started and all the sprites which were created oirignally are now no longer there. What remains is a photo which is being loaded within the preload state. I have researched the issue and seen parameters added to it to clearWorld but that did not solve the problem. I read that reset an array or something like that would force
  2. I am just wanting the player to not be able to past the spike when it is in a certain frame. Thats reminants of me following tutorials unsuccessfully. Was hoping that there was a glaring error within my code which would be why I cannot make the spikes body to be toggleable depending on its current frame.
  3. Hi, as the title suggests I am attempting to enable the body of a sprite at a specific animation frame in order to prevent the player from passing. I have attempted many ways after reading documentation and have not be able to find a solution. The code is written in OOP and the classes are separated. I've used collision function to no avail, apparently I cannot access .sprite. I must be missing something or the functionality is not there. The sprite, which will be many as it is part of a group, contains a method called checkHit & addCollision both of these methods retrieve the f
  4. EDIT: I feel stupid but for some reason the server was caching JSON, Check to see if anything is being cached by reloading the directory or by removing it in .htaccess Attempting to add Objects dynamically to the game from using the objects layer within Tiled. My map works and loads the Layer Title 1 however when I attempt to use the createFromObject method I am met with the following error and I cannot seem to debug as I have literally watched and looked many videos and tutorials and the only difference in some of them is that I am writing it in an OO way. I don't underst
  5. Hi I have come to a dead in, I have attempted various research on platforms such as google, YouTube and Lynda however to no avail. I have used TexturePacker to create a spritesheet assiociated with JsonArray so that I can incorporate animations within my project however I am met with this Index error which is assiociated with the first line of code: this.sprite.animations.add('walk', Phaser.Animation.generateFrameNames('Slide', 1, 10), 10, true, false); this.sprite.animations.play('walk'); I have preloaded the required JsonArray and Image path within the preloader by doing the fo
×
×
  • Create New...