Change Image On Click in Phaser 3

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 11

  • @maskman4821
    @maskman4821 4 года назад +2

    This is a very cool tutorial, thank you Mr. Clarkson !!!

  • @augmentchinedu
    @augmentchinedu Год назад

    This was fantastic. Thanks I'll be sure to use it

  • @GotchiBulls
    @GotchiBulls 2 года назад

    Thanks fren! ❤❤❤

  • @rickeyrudey
    @rickeyrudey 4 года назад

    Been watching all your tutorials and they have been very helpful. I've been researching for a long time on one particular thing though. You know like in fighting games how they would make you change the color of your playable character? is there a way in phaser or any other game engine that allows you to swap specific pixel colors of your sprite for another? (NOT referring to changing the tint). For example if the pixels of the character's pants are the color red and i want to change the color to lets say blue. It would make an awesome tutorial because instead of recreating the sprites you could just use codes to modify them and make them appear different.

    • @WClarkson
      @WClarkson  4 года назад

      Other than using tint, the only other way to do that would be to swap the image. I've built avatars before out of multiple images. You could have an image for each different piece of clothing. I would probably still have them all white and then use tinting.

    • @rickeyrudey
      @rickeyrudey 4 года назад

      @@WClarkson thanks for replying man. i was hoping that the pixels could be manipulated during game play since my sprites sheets are already rendered with multiple colours and to avoid breaking them up into pieces. i've done the tint trick before but only with the character in full white. but in this case i'm working on a game with each character having multiple animations it would cut down a lot of the workload if i could play around with the pixels. I know however it would probably be an expensive operation to run on ur PC and swallow a lot of memory if it were possible. but maybe one day. Keep the tuts coming.

  • @yasminamran5
    @yasminamran5 3 года назад

    thanku for this I really need it. But i get " GridAlign is not defined " unless i use Phaser.Actions.GridAlign But thenI get an error when I try to use showNumbers or placeAtIndex: _this.gridd.placeAtIndex is not a function Any help to solve it would be appreciated!

    • @WClarkson
      @WClarkson  3 года назад

      The class should be AlignGrid not GridAlign

  • @SketchTurner
    @SketchTurner 4 года назад +1

    Goddamn I was trying to learn how to swap an image on a click not find out how to program a card game. Why is this 10 minutes long

    • @WClarkson
      @WClarkson  3 года назад +2

      Because it is. Just fast forward until you find what you need.