和Arcade街机模块作者的交流email_how to change sprite’s scale dynamicly?

Try changing width and height. I think those should work. Need to code scale to work.

Paul Vincent Craven

 

On Mon, Mar 18, 2019 at 9:10 PM 李兴球 <406273900@qq.com> wrote:

hello, I want to change sprite’s scale , when its moving, below is a example code  :

 
class Effect(arcade.Sprite):
    def __init__(self,x,y):
        super().__init__(“images/lovely_turtle.png”,scale=0.1)
        self.alpha = 50
        self.center_x = x
        self.center_y = y
        self.change_y = 1
        
    def update(self):
        super().update()
        if self.bottom > SCREEN_HEIGHT :self.kill()
        self.scale += 0.1 
 
But it is not change scale when it moving. How can change it size when it moving?

我问的是:如何在角色移动的时候动态的改变角色的大。

Paul Vincent Craven回答说:改变角色的宽度或高度应该有用,需要编码才能工作。