Corona SDK 設定object:setReferencePoint()出現錯誤

今天依照範例要設定一個Group的中心點時,程式碼如下:
group1:setReferencePoint(display.CenterReferencePoint)

執行時出現了下列的錯誤:
object:setReferencePoint() is only available in graphicsCompatibility 1.0 Mode

訊息明白指出object:setReferencePoint()只能用在Graphics 1.0,而新版的Corona SDK則已經改為2.0
Graphics 2.0改用anchorX、anchorY來改變中心點,於是改寫程式為下列:
group1.anchorX = 0.1
group1:anchorY = 0.5

執行時還是出現了錯誤,原來Group的anchorChildren預設值為false,所以無法自訂中心點,必須改為:
group1.anchorChildren = true
group1.anchorX = 0.1
group1.anchorY = 0.5

這次執行就成功了。

Windows 11安裝時跳過網路連線