本文整理汇总了C++中SpriteBatch::add方法的典型用法代码示例。如果您正苦于以下问题:C++ SpriteBatch::add方法的具体用法?C++ SpriteBatch::add怎么用?C++ SpriteBatch::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpriteBatch
的用法示例。
在下文中一共展示了SpriteBatch::add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: w_SpriteBatch_add
int w_SpriteBatch_add(lua_State * L)
{
SpriteBatch * t = luax_checkspritebatch(L, 1);
float x = (float)luaL_optnumber(L, 2, 0.0f);
float y = (float)luaL_optnumber(L, 3, 0.0f);
float angle = (float)luaL_optnumber(L, 4, 0.0f);
float sx = (float)luaL_optnumber(L, 5, 1.0f);
float sy = (float)luaL_optnumber(L, 6, sx);
float ox = (float)luaL_optnumber(L, 7, 0);
float oy = (float)luaL_optnumber(L, 8, 0);
t->add(x, y, angle, sx, sy, ox, oy);
return 0;
}
示例2: w_SpriteBatch_set
int w_SpriteBatch_set(lua_State *L)
{
SpriteBatch *t = luax_checkspritebatch(L, 1);
int index = luaL_checkinteger(L, 2);
float x = (float)luaL_optnumber(L, 3, 0.0f);
float y = (float)luaL_optnumber(L, 4, 0.0f);
float angle = (float)luaL_optnumber(L, 5, 0.0f);
float sx = (float)luaL_optnumber(L, 6, 1.0f);
float sy = (float)luaL_optnumber(L, 7, sx);
float ox = (float)luaL_optnumber(L, 8, 0);
float oy = (float)luaL_optnumber(L, 9, 0);
float kx = (float)luaL_optnumber(L, 10, 0);
float ky = (float)luaL_optnumber(L, 11, 0);
t->add(x, y, angle, sx, sy, ox, oy, kx, ky, index);
return 0;
}