I have never had this issue with Phaser before. I'm using Phaser-2.6.2 and for some reason, all of the sudden, I can no longer debug my physics bodies. Inside of render I have something as simple as:
this.game.debug.body(this.hero);
this.game.debug.body(this.boss);
This used to work, not sure why something this basic would all of the sudden stop working. Is there a simple fix for this? I tried creating a new project from scratch and am having the same problem.
Thanks!
Related
I have recently started using version 3.18 for a game which was earlier developed in version 3.9. Also, I am using Phaser.SCALE.FIT in config.
But on clicking or touching(in case of mobile) on some button images on the canvas nothing happens. I am using gameObject.setInteractive() and then gameObject.on(‘pointerdown’, function(){}) but the pointer down is not detected.
But if the size of the browser window changes somehow in between the game then the click is detected and everything else works fine.
How can I fix this issue any suggestion will be great help.
I don’t know the exact problem but when I used scene.scale.setGameSize(width, height) (https://rexrainbow.github.io/phaser3-rex-notes/docs/site/scalemanager/#events) in the create() the game starts working properly.
I'm currently trying to create a carousel that plays Youtube videos in Angular with ngbootstrap. I've managed to successfully embed the videos but I've noticed that the (mouseenter) and (mouseleave) functions that the bootstrap carousel comes with is calling pause() and cycle(), both of which make the video start to reload/replay each time your mouse enters or exits the carousel space. I want to override them to prevent this from happening.
I've looked through node_modules/#ng-bootstrap/ng-bootstrap/carousel for a way to possibly override them but I don't see anything that'll do so.
I found a ngbootstrap github source that appears to have a file that allows for overrides:
https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/carousel/carousel.ts
but being new to Angular I'm not sure if I don't have the same ngbootstrap, or if I couldn't find these files or what. Let me know if more information is needed!
I recently found an answer from someone on reddit! I needed to add pointer-events : none to ngb-carousel.
I am trying to port over a bit of code from wx2.8 to wxPheonix (3.0.3.dev78356 msw). I'm using code from the pyfa project (https://github.com/DarkFenX/Pyfa) which is currently being rewritten for python3. This code takes some concepts from PyCollapsiblePane and implements it better (there are some bugs with PCP). If you download and open pyfa, the collapsible panels are on the right side (resources, resistances, etc) if you want to get a feel for how it is supposed to work.
Anyway, I'm trying to port this over and I cannot seem to get it to work well. I know Pheonix introduces some changes to sizers and how things are resized. I am able to collapse the panel (and have the parent panel fit to the new size), and then open it again. But when I try to collapse it again nothing seems to happen.
Here's what is currently happening:
http://gyazo.com/68717f66c498d850ef60ee83e1c0ae4a
And here is how it's suppposed to work (wxPython 2.8 in the pyfa app)
http://gyazo.com/87cc0f61052dca0e81c387da0f84c0c4
This is the module that I'm working on (the script has a test case if run directly): http://pastebin.com/ghuVGXWN
Any ideas?
I had to remove self.SetMinSize(sz) from OnStateChange, works great now.
Thanks for all the help this site has been to help answer many questions!
I overrode drawRect in subclass of UIView, drew a bunch of images and save them as PNGs.
Next I am trying to load the images for use in ViewController.m
Finally got animations working, but experienced a time when VC would try to load the images before Draw2D had saved them. Found that NSLog worked well to see sequence of events:
if ([self loadNamedImage:nameToLoad]) {
[image2set addObject:[self loadNamedImage:nameToLoad]];
NSLog(#"Loaded %#", nameToLoad8); }
loadNamedImage is the method that returns the loaded images. Adding if/exist seemed to fix the problem for awhile, but I want to properly use something like
performSelectorOnMainThread:withObject:waitUntilDone:;
// where to place command, which object, etc?
tried using sleep statement in VC hoping the sleep time would be used to save the images before trying to load them .. how can the program startup sequence be adjusted enough to make this work?
dBC
found that using viewDidAppear vs viewDidLoad solved my problem for awhile.
Recently started working with Gestures and reset simulator setting as suggested to fix finding needed files. Now the images won't load again because viewDidAppear tries to load pics before overridden DrawRect method draws them. Tried different restore points, clean project, and uninstall app from simulator to no avail :o(
Examples of where and how to implement addDependency, GCD or other solution are greatly appreciated!
Dear community im using the masonry script on this site: http://www.hoeckernetworks.impulsfaktor.abcde.biz/
I was searching for an option to fix the picture loading problem and i found imagesLoaded. I try to get it to work, but it wont do its job. I am not a great javascript programmer and tryed it with the example code. Maybe someone has a hint for me. Just to inform: i use masonry working with html. If its needed i can send my source but i think one can see it on the site.
regards an already thanks for any help