Closed ndrluis closed 9 years ago
Oh gosh, I learned the hard way... If you want to make your game more ruby like ONLY create game objects via GameObjectFactory
@andreanastacio Hey, sorry I haven't said much or made commits this past week. I've been sick and busy with some other stuff. I just noticed yesterday this PR and how you're trying to make the demo work. Yeah, I've also had to learn the hard way that you have to use GameObjectFactory to make the the wrapper more Ruby-like.
Btw, we should also have the star collectible items working for the demo. In case you don't know what I mean, here's the article we were basing the demo off of: http://www.photonstorm.com/phaser/tutorial-making-your-first-phaser-game
@andreanastacio So, I noticed that the player is not getting properly added into the world for some reason, and I saw your commit where basically @game.add.sprite
creates a new sprite in the World group. However, I tested it and it doesn't seem to be working yet for some strange reason. Do you have anything on your end as to why the player is not yet getting created in the world?
@ylluminarious "fixed" but still with error. Instead of initiate with initial position, the player are initiated with full sprite sheet.
@andreanastacio Yeah, I see what you mean. It's showing the whole sprite sheet there. It looks like it's also giving an error that body.bounce
is undefined. I'll try and look into it and see if I can fix it.
@andreanastacio I fixed the body properties on the sprite, so they seem to be working now. Now only the animation is still having problems.
Btw, before I noticed your commits to this demo branch, I was working on a similar Physics::Arcade::Body class here. I noticed that the one you made (which is the one here on GitHub) and the one I made are both having an error about sprite.texture.frame
in Phaser's Body class. I thought it was interesting that this error has come twice, in both the class I was making and the one you've made.
I was hoping that we could get the class working eventually, so that don't have to rely on alias_native
, but we don't need to worry about it right now.
thx <3
Np
FYI, I tried to use Forwardable
to delegate Sprite
methods to Player
, but I caught some leaks.
@andreanastacio The demo appears to be working perfectly now, so I think this PR is ready for merging :)
:shipit:
plz does not merge this PR until demo is working perfectly <3
Acceptance Criteria