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 px を超えた後にスケーリングするコードを記述する必要があります。このコードを作成しましたが、機能しません。
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)
また、物理体をスケーリングする場合、画像のみがスケーリングされると思います。物理ボディはスケーリングされません。ですから、それを覚えておいてください!