Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: metamorphium on March 28, 2010, 04:05:07 PM
-
Hi Mnemonic,
please, is there a way how to programatically distinugish in between the aforementioned? ent.Type always returns entity.
Thank you very much!
-
Entity.Region property will contain null if it's not a region entity.
-
Thank you. Just to be sure: Even if I use dynamic region creation in entities (theora buttons)?
-
It doesn't matter. As long as the entity has a region assigned, it's accessible using the .Region property.
-
so in that case it's not possible to distinguish that.
Thank you again.
-
I don't understand. It's legal for an entity to have both sprite and region. You can query both using script.
-
I am traversing all scene entities in a loop layer by layer. I am making an internal index based on the fact if the node is Entity, not region entity.
Your recommendation was to test for Region attribute. If it's null, I wouldn't index. This works for regular entities / region entities. But I also have theora entities which have regions dynamically assigned so they are clickable.
These entites will never get indexed because their Region attribute is not null.