This shows you the differences between two versions of the page.
en:examples:orx_scroll:collisions_with_scrollobjects [2022/07/14 05:55 (3 years ago)] – created sausage | en:examples:orx_scroll:collisions_with_scrollobjects [2024/11/06 05:00 (5 months ago)] (current) – Probably GetName change is premature but saves me forgetting later sausage | ||
---|---|---|---|
Line 3: | Line 3: | ||
Collisions can be tested in ScrollObjects using the '' | Collisions can be tested in ScrollObjects using the '' | ||
- | Also, the parts of both ScrollObjects that are colliding are available in the function. | + | Also, the individual |
<code c> | <code c> | ||
- | orxBOOL | + | void Enemy:: |
orxBODY_PART *_pstPart, | orxBODY_PART *_pstPart, | ||
orxBODY_PART *_pstColliderPart, | orxBODY_PART *_pstColliderPart, | ||
Line 16: | Line 16: | ||
} | } | ||
- | const orxSTRING colliderName = _poCollider-> | + | const orxSTRING colliderName = _poCollider-> |
if (orxString_SearchString(colliderName, | if (orxString_SearchString(colliderName, | ||
const orxSTRING shipPartName = orxBody_GetPartName(_pstColliderPart); | const orxSTRING shipPartName = orxBody_GetPartName(_pstColliderPart); | ||
Line 22: | Line 22: | ||
} | } | ||
- | return orxTRUE; | ||
} | } | ||
} | } | ||
</ | </ |