Search found 26 matches

by bvargish
Wed Jan 06, 2016 2:57 pm
Forum: Bug reports
Topic: Possible JSON export glitch breaking Phaser callbacks
Replies: 5
Views: 23894

Re: Possible JSON export glitch breaking Phaser callbacks

Just a note that I was able to duplicate this numerous times. I would add a sensor to an existing scene, export to JSON, and add a callback in Phaser. The callback wouldn't work. Then I would delete a bunch of stuff in my RUBE scene, export to JSON, reload in Firefox (the game would be broken in my ...
by bvargish
Wed Jan 06, 2016 2:51 pm
Forum: Bug reports
Topic: Sleeping allowed not implemented in RUBE loader for Phaser
Replies: 0
Views: 28907

Sleeping allowed not implemented in RUBE loader for Phaser

Posting this in case you ever update your loader for Phaser. I suppose this isn't a bug as much as an unimplemented feature.

Even if "Sleeping allowed" is unchecked in RUBE, you still have to manually use body.data.SetSleepingAllowed(false) in Phaser to keep the body from going to sleep.
by bvargish
Tue Dec 08, 2015 10:03 pm
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Re: Can I add an image to a body within Phaser?

Ah, right. Didn't think about that since my project doesn't require multiple images on a body. So far haven't run into any trouble. And I was just able to attach an animated sprite this way :D
by bvargish
Mon Dec 07, 2015 4:29 pm
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Re: Can I add an image to a body within Phaser?

I figured this out by posting in another forum: http://www.html5gamedevs.com/topic/19047-box2d-plugin-how-can-i-attach-sprite-to-existing-body/ Note that with this method, the updateRubeSprites loop that has to be called in Phaser's update function is no longer necessary. This may result in improved...
by bvargish
Fri Dec 04, 2015 7:02 pm
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Re: Can I add an image to a body within Phaser?

Got it! The halo is being caused by line 759 of phaser-rube.js. If I comment it out the halo goes away!

Code: Select all

//img.sprite.tint = rgbToHex(img.colorTint[0], img.colorTint[1], img.colorTint[2]);
by bvargish
Fri Dec 04, 2015 6:46 pm
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Re: Can I add an image to a body within Phaser?

Figured out that if I set imageScale = 1 in updateRubeSprites then it will essentially turn off the scaling, which would work for me if I attach the images in R.U.B.E. Now I just have to figure out what is causing the images to have a halo around them. This happens in Firefox after I reload the page...
by bvargish
Fri Dec 04, 2015 2:49 pm
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Re: Can I add an image to a body within Phaser?

Hi Chris, I'll send you the source code so you can see the lag and look over phaser-rube.js (I was looking at the wrong rube-phaser.js file before) as you suggest. What I'm wondering is why you are using an images array and having them chase bodies rather than checking if there is an image attached ...
by bvargish
Thu Dec 03, 2015 8:04 pm
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Re: Can I add an image to a body within Phaser?

Still haven't figured this out. If I assign a sprite to a body using body.sprite = the sprite doesn't move along with the body unless it already has a R.U.B.E. defined image assigned to it. In that case I have 2 images following my body, but the Phaser assigned image sticks around if the body is des...
by bvargish
Thu Dec 03, 2015 7:13 pm
Forum: R.U.B.E discussion
Topic: How to access a body's custom properties from within Phaser
Replies: 0
Views: 26690

How to access a body's custom properties from within Phaser

This was initially a question, but I figured it out so I'm posting the answer for anyone else who needs it. 1. Create custom properties as explained at https://www.youtube.com/watch?v=nCp-EK_IICA 2. Load your scene into Phaser as explained at https://www.youtube.com/watch?v=_QqKMv6I2hc 3. Access you...
by bvargish
Thu Nov 05, 2015 4:50 am
Forum: R.U.B.E discussion
Topic: Can I add an image to a body within Phaser?
Replies: 8
Views: 25037

Can I add an image to a body within Phaser?

I know I can add images to bodies from within R.U.B.E., but is it possible to add them later from within Phaser using RUBE loader imported scenes if I needed to? Also, would it be possible to swap an image?