Giter Site home page Giter Site logo

phaser4-rex-plugins's Issues

[VirtualJoystick] Can VirtualJoystick and Button coexist?

Hi, first of all thanks for all these amazing plugins and for all the time spent on them, I really appreciate that.
I've a just a simple question about VirtualJoystick plugin:
Using Phaser3, I was trying to implement a virtualjoystick plugin (player move), and a simple fire button.
They actually work like a charm, but only if I press one of them individually. When playing on a mobile device, if I keep the joystick pressed (because of moving), the fire button doesn't work. I've to release the thumb on virtualjoystick before, either the joystick or the button I mean. Trying to debug using devtools on Chrome, it seems that the click event on the button, doesn't fire at all if you are moving the joystick.
This is my code:

import Button from 'phaser3-rex-plugins/plugins/button.js';
import VirtualJoystick from 'phaser3-rex-plugins/plugins/virtualjoystick.js';

export class Player extends Phaser.Physics.Arcade.Image {
...

createJoyStick() {
  this.joystick = new VirtualJoystick(this.scene, {
    x: 100,
    y: 500,
    radius: 50,
  });
}

...

createFireButton() {
  const button = this.scene.add.circle(700, 500, 30).setStrokeStyle(2, 0x1a65ac)
  this.fireButton = new Button(button);
  this.fireButton.on('click', () => {
    //... fire!
  });
}

and from my package.json

...
"phaser": "^3.55.2",
"phaser3-rex-plugins": "^1.1.69",
...

I can understand if you won't help me, don't worry, but thank you anyway.

NPM Release

Hi Rex,

We are starting development of a new game , and would love to adopt Phaser 4 and RexPlugins Since development. Would love to contribute back in the process.

Can you start pushing Phaser4-Rex-plugings to NPM , so that we can start consuming those ?
Additionally is there an alternative to consume the packages if you are not planning to release those in Alpha / Beta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.