Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite.alive and other properties not set intrinsically #841

Closed
lewster32 opened this issue May 21, 2014 · 4 comments
Closed

Sprite.alive and other properties not set intrinsically #841

lewster32 opened this issue May 21, 2014 · 4 comments

Comments

@lewster32
Copy link
Contributor

It appears that some properties are not set intrinsically within the Sprite object, including visible and alive. One of the side effects of this is that if the Sprite object (or anything extended from it) is instantiated directly rather than through the factory methods, alive is never set, and so the damage method does not function correctly. See the following post: http://www.html5gamedevs.com/topic/6609-extending-sprite-and-damage/

Is there a specific reason for this, or is it an oversight?

@photonstorm
Copy link
Collaborator

Yeah I saw the thread. From what I can tell it's just the alive property though, I can't see anything else missing. visible for example is most definitely defined properly.

@lewster32
Copy link
Contributor Author

I may need to get my eyes checked, can't seem to see where it's defined, though you're right, it does get defined... Anyway, looks like that's got it :)

@photonstorm
Copy link
Collaborator

visible is a pixi level property, look further up the prototype chain for it.

@lewster32
Copy link
Contributor Author

Aha :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants