我將一組對象插入到具有圖像矩形的父組中,並且據我所知,除外結果應該是外部組將從屏幕左上角的點(0,0),內部的組將指向父組的左上點,實際上就像我描述的那樣,在外部組中沒有圖像矩形,問題是當外部組具有一個圖像矩形,所以外部組中心點位於屏幕的左上角,內部組位於父組的中心?Corona SDK - 帶有圖像矩形的組,錯誤的參考點
發生了什麼事?請幫助...
local checkinContent = display.newGroup();
local BG= display.newImageRect(checkinContent,"images/magen-david_backgound.png",display.contentWidth, 0.45822 * display.contentHeight);
checkinContent:setReferencePoint(display.TopLeftReferencePoint);
checkinContent.y = display.contentHeight - checkinContent.height;
checkinContent.x = 0;
local circlesGroup = display.newGroup();
circlesGroup:setReferencePoint(display.TopCenterReferencePoint);
circleTable[0] = display.newImageRect(circlesGroup,"images/circle.png",0.0265 * display.contentWidth, 0.0265 * display.contentWidth);
circleTable[1] = display.newImageRect(circlesGroup,"images/circle.png",0.0265 * display.contentWidth, 0.0265 * display.contentWidth);
circleTable[2] = display.newImageRect(circlesGroup,"images/circleCurrent.png",0.0265 * display.contentWidth, 0.0265 * display.contentWidth);
circlesGroup.y = 0;
checkinContent:insert(circlesGroup);
如果這沒有幫助,然後嘗試用簡單的方式來描述你想要存檔。從你的解釋中很難理解它。 – vovahost
感謝您的幫助,您可以在上面看到我已經找到我的答案,問題在於參考點是在第一個位置後變爲中心。 – Adler