elad

Members
  • Content count

    5
  • Joined

  • Last visited

  1. elad

    one object several groups

    is it possible to put one object in several gruops ? any chance for a side effects?
  2. elad

    SET BOUND BOTTOM AND TOP

    Y no1 answer ?
  3. Posted 2 hours ago Is there a way to create sprite from multiple files ? Like creating a sprite : Knight in 'knight.js' and creating his movement in 'movement.js' is this possible : // knight.js import Phaser from 'phaser' import Movement from './movement' export default class extends Phaser.Sprite { constructor ({ game, x, y, asset }) { super(game, x, y, asset) } movement(){ // Here Ill call Movement } } // movement.js import Phaser from 'phaser' export default class extends Phaser.Sprite { // Here ill make a function that will move the sprite // and start the animation }
  4. Is there a way to create sprite from multiple files ? Like creating a sprite : Knight in 'knight.js' and creating his movement in 'movement.js' is this possible : // knight.js import Phaser from 'phaser' import Movement from './movement' export default class extends Phaser.Sprite { constructor ({ game, x, y, asset }) { super(game, x, y, asset) } movement(){ // Here Ill call Movement } } // movement.js import Phaser from 'phaser' export default class extends Phaser.Sprite { // Here ill make a function that will move the sprite // and start the animation }
  5. I use this function to set bounds this.game.world.setBounds(0, 0, gameOptions.gameWidth - 20, gameOptions.gameHeight - 20) But this only set bound from bottom to top. What i want to do is set the top and bottom bounds to stop my character from walking on the sky