Ovis_Entity_Attached_Decoration_Nth()
摘要
获取附着在 Ovis 实体上的第 n 个装饰物。
语法
Ovis_Entity_Attached_Decoration_Nth (ent_ptr, index)
| 参数 | 类型 | 说明 |
|---|---|---|
ent_ptr |
OvisT_Entity * |
Ovis 实体 |
index |
unsigned int |
索引编号 |
返回类型
OvisT_Decoration *
返回附着的装饰物
头文件
ovis_entity.h
详情
该函数获取附着在 Ovis 实体上的第 n 个装饰物。
示例
OvisT_Entity * ent_ptr;
unsigned int count, i;
OvisT_Decoration * dec_ptr;
/* …entity created elsewhere */
count = Ovis_Entity_Attached_Decoration_Count (ent_ptr);
for (i = 0; i < count; i++)
{
dec_ptr = Ovis_Entity_Attached_Decoration_Nth (ent_ptr, i);
/* … do something with decoration */
}
错误
- 实体为 NIL。
参考
- 使用函数 Ovis_Entity_Attached_Decoration_Count() 可以获取附着在实体上的装饰物数量。