-
Notifications
You must be signed in to change notification settings - Fork 231
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
Curious about CitrusObject.as, whether it may be a little too light? here's why- #251
Comments
Just by making a cast? ( Also, to do it properly, we should cast using the interface |
If I were to write that, and there was a nape physics object in the array, wouldn't it error? |
If your |
Well, in fact Just use |
Ah, alright, damn, I did not know I could use interface classes like that, I was always taught they were just to enforce a different class to follow that blueprint (interface) nothing more. Thank you |
can the common properties in the interface class be set? |
yes visible can be set. actionscript interfaces does not allow us to force anything other than methods, so to say that any ISpriteView object should have a "visible" property, we define the getter as a workaround. So at least its going to be a readable property but in reality they can be set as well (edit: you can see "view" is in there as well) |
Come to think of it, I'd totally understand if this line threw an error because there's no explicit set defined in the interface - and in that case we'd have to add it |
Just a thought.. let's take a physics engine object and a citrussprite for example, if these two were stored in the same array, how would one access the x and y values via array[ i ].x/y? If the only common parent is CitrusObject.
The text was updated successfully, but these errors were encountered: