Sign in to follow this  

Custom image class with colour property using Phaser 3 / Javascript

Recommended Posts



I'm working on creating interactive buttons which, when clicked, will set the colour of the player.


I've managed to do this successfully, in Phaser 3, but the code is quite bulky and ugly looking. I've just been gathering what examples I can through the website, but I'm certain there must be a better way to do this.

Here's what I've got:



I think what I want to do is create a class for "smalltiles", but I'm not sure how the inheritance should work for using alongside Phaser 3. 

I've tried writing something like in several different ways, without success:

Does anybody have any insight as to how I  might be able to do this better?

Thanks for the input in advance. 



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.