Théo Sabattié

  • Content Count

  • Joined

  • Last visited

About Théo Sabattié

  • Rank
    Advanced Member
  • Birthday 09/11/1994

Profile Information

  • Gender

Contact Methods

  • Twitter

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Phaser is a game engine using pixijs. You should use pixijs.
  2. game is the parameter of the function create. You can add game as parameter of the mechant constructor. Or define a global variable game and assign its value on create function (ugly)
  3. heroname = localx[i]; // ... heroname.body.velocity.x = -250; body is undefined. so body property does not exist on heroname.; Does that return a complexe objet? That name looks like returning a string
  4. var sens = Math.random() * 360; (?) Is there an error in the console? Can you share more code?
  5. blog? I know only What is the url?
  6. That is more easy to manage sprite positions by grouping them in a container. Invoke Destroy on a container don't destroy children by default : If you are making a car you won't move the wheels and the car's body distinctly. You shouldn't move all pieces of a gameObject, that is more easier to move only one object.
  7. I retried, that is ok' now. I checked console, I didn't find something in the logs. Good job !
  8. That looks nice but when I click on Start button, nothing happen :/
  9. Nice !
  10. That is pretty cool! Congratulation for your creation !
  11. I am not sure to understand... Do you want the list reference in each object in it? like var list = [ { id: 'base', prop: 'base_something', myList: // == list }, { id: 'somethingelse', prop: 'anotherprop', myList: // == list }, { id: 'somethingelse42', prop: 'anotherprop42', myList: // == list }, ] ? If it is that, you can do: var list = []; function ListElement(parameters){ // replace name making sens this.list = parameters.list || []; this.list.push(this); this.prop = parameters.prop || "defaultProp"; = || "defaultId"; // your own properties instantiation } new ListElement({ list : list, prop : "hello", id : "world" }); Or do you want that the last object of your list have the same property of the first element? Do you want that the last object has alway the same property of first? (if first remove, take new property of new first. If last remove, set property of first on new last ?)
  12. remove ',' at the end
  13. Hi'' You have to cast your htmlElement: this._canvas = <HTMLCanvasElement> yourHtmlElement; this._canvas = yourHtmlElement as HTMLCanvasElement;