I'm having trouble destroying Sprites in Phaser.  I have a JavaScript object, let's call it Block. Block has a sprite property, that gets set like so:  this.sprite = this.game.add.sprite(this.x, this.y, 'blocks', this.color);   At a c...
I made a cordova project and device ready worked, I didn't get any errors. Then I tried to add two javascript files and a folder full of images.  I have linked them in the index.html and didn't delete anything.. Now Device Ready does fire? No...
I am new to phaser 2.3.x. These are the five positions:  1   2   3   4   5.  My problem is - I want to generate a circle_no_1 sprite at position 1. After two second I want to shift the circle_no_1 to position 2 and at the same time generate another c...
Good evening, sorry for asking again, but I need to be done with this by tomorrow for school. Basically, when I try to access the this.game variable in the update function, it says that it is undefined, to be specific, I get this; "Uncaught TypeE...
When I run my game in Google Chrome and Firefox, the game screen is black, once I refresh it, it runs as it should.  The error I see in the console when the screen is black is:     TypeError: paddle is undefined (Firefox)      Uncaught TypeError: Can...
I am using Matter.js physics in an attempt to create soft bodies. I was able to create a body like this:    However I am not sure if this is the "soft body" I want. It is true that this body is not entirely rigid and has that bouncy feel when...
I setup an example jsfiddle to illustrate this with proper assets.  When your character is moving and the camera starts to pan, you will notice the background has a small "jitterness". This can be disabled by setting game.camera.roundPx to tr...
import React, { Component } from 'react'; import Phaser from 'phaser';  export default class App extends Component {   constructor(props) {     super(props);      this.game = null;     this.create = () => {       this.game.stage.ba...
I am trying to detect when two object collide with each other, but I am not sure how to do it.  I have the following scene, which adds two physics images to the scene. I just need a way to detect when the two collide.  export class MainGame extends S...
I'm trying to tween a sprite from one point to another and have it fade away while it's moving. I've tried this:  const tween = game.tweens.add({   targets: [log.sprite],   x: fire.x,   y: fire.y + (fire.height * 0.2),   opacity: 0,   dur...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.