コード例 #1
0
int LuaSyncedMoveCtrl::SetRelativeVelocity(lua_State* L)
{
	CScriptMoveType* moveType = ParseMoveType(L, __FUNCTION__, 1);
	if (moveType == NULL) {
		return 0;
	}
	const float3 relVel((float)luaL_checknumber(L, 2),
	                    (float)luaL_checknumber(L, 3),
	                    (float)luaL_checknumber(L, 4));
	moveType->SetRelativeVelocity(relVel);
	return 0;
}
コード例 #2
0
int LuaSyncedMoveCtrl::SetRelativeVelocity(lua_State* L)
{
	CScriptMoveType* moveType = ParseScriptMoveType(L, __FUNCTION__, 1);

	if (moveType == NULL)
		return 0;

	const float3 relVel(luaL_checkfloat(L, 2),
	                    luaL_checkfloat(L, 3),
	                    luaL_checkfloat(L, 4));
	ASSERT_SYNCED(relVel);
	moveType->SetRelativeVelocity(relVel);
	return 0;
}