| 07-29-2008, 04:25 PM | #1 |
I've been using regions for a long time, but I couldn't find much information about it. Pros GetTriggeringRegion() saves a lot of work. IsUnitInRegion() works really decent, unlike buggy RectContainsUnit(). Shape is not limited to rectangles. Cons ??? If you have any idea, please let me know. |
| 07-29-2008, 05:56 PM | #2 |
rect if struct of 4 reals. region is object |
| 07-29-2008, 05:58 PM | #3 |
Well, you can't use regions in GUI, only rects which are for some strange reason also named regions. Also, it's kind of hard to make regions, because you have to create rects....... but in general, yes, they don't have any side-effects. |
| 07-30-2008, 01:07 AM | #4 | |
Quote:
AFAIK rect is also an object, and so is location. Am I wrong? |
| 07-30-2008, 07:58 AM | #5 |
Region have no coordinates |
| 07-30-2008, 01:39 PM | #6 | |
Quote:
|
| 07-30-2008, 02:19 PM | #7 |
Rect is not object, this is data handle, like location. Everything that cannot affect gameplay by it existance in any way is not object - its data. Timer = can execute some function Region = can register leave or enter events Unit = have mass events on it |
| 07-30-2008, 02:45 PM | #8 | |
Quote:
That's up to the definition of the object. It may vary. In a programmer's sense, anything instantiable could be an object. |
| 07-30-2008, 04:34 PM | #9 | |
Quote:
|
| 07-30-2008, 07:22 PM | #10 |
rect != region |
