嗨,我的对象从右向左移动我怎样才能将它从上到下更改?
function movebadc1(self,event)
if self.x < -50 then
self.x =300
self.y = 300
self.speed = math.random (2,6)
self.initY = self.y
self.amp = math.random (20,100)
self.angle = math.random (1,360)
else
self.x = self.x - self.speed
self.angle = self.angle + .1
self.y = self.amp * math.sin(self.angle)+self.initY
end
end
问候凯文