类型 函数 库 display.* 返回值 GroupObject(组对象) 修订 版本 2024.3703 关键词 组,对象,分组 另请参阅 组编程 (指南)
创建一个显示组,用于组织/分层显示对象。最初,组中没有子项。局部原点位于父级的原点;锚点初始化为此局部原点。
有关更多信息,请参阅 组编程 指南。
将组与物理引擎一起使用有一些限制 - 请参阅 物理注释/限制 指南。
display.newGroup()
-- Create a rectangle and a group, then insert the rectangle into the group local rect = display.newRect( 0, 0, 100, 100 ) rect:setFillColor( 0.5 ) local group = display.newGroup() group:insert( rect )