Hi everyone,
Today i was doing some tests on scene.Action capabilities, but I sruggled with two weirds behaviours of actions:
1) Node.paused boolean does not seems to be locked in 'false' state, not changing when executing an action or not; however it is also possible that I didn't understood this attribute. testing code...
from scene import *
class Main(Scene):
def setup(self):
self.background_color = '#cdcdcd'
self.char = SpriteNode('plf:AlienBlue_stand', x_scale = 3, y_scale =3)
self.char.position = (512,384)
self.add_child(self.char)
print(self.char.paused, 'a')
self.char.run_action(Action.move_by(0,-100,1.0))
print(self.char.paused, 'b')
run(Main())
...which would presumably give us a False then a True. but we get two 'False'. Try it by yourself and tell me if you get others results !
2) When I use a Action.group of two Actions which would negate themselves, only the second one is taken into account; testing code...
class Main(Scene):
def setup(self):
self.background_color = '#cdcdcd'
self.char = SpriteNode('plf:AlienBlue_stand', x_scale = 3, y_scale =3)
self.char.position = (512,384)
self.add_child(self.char)
def touch_began(self,touch):
action_group = Action.group(Action.move_by(0,100),Action.move_by(0,-100))
if not self.char.paused:
self.char.run_action(action_group)
run(Main())
... and for output I let you try it by yourself too. Have a nice day/night,
Thanks in advance,
SmartGoat