Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要编写一个代码,它在对象经过 500 像素后对其进行缩放,我编写了此代码,但它不起作用:
function localScale( event ) if self.y > 500 then self.scale(1.10, 1.10) end end
问题是什么?
你应该给
self:scale(1.10,1.10)
或者你可以给
self.scale(self,1.10,1.10)
另外,我认为在缩放物理体时,只有图像被缩放。物理体未缩放。所以请记住这一点!