On Tue, Jun 22, 2010 at 1:40 AM, claudio canepa <[email protected]> wrote:
>
>
> On Mon, Jun 21, 2010 at 4:59 PM, claudio canepa <[email protected]> wrote:
>>
>>
>> I was getting the same with r978, the sample works ok in my system with
>> r979 (note that I changed test_action_non_interval.py in r979)
>> Just to be sure I have done a fresh checkout from the repo, and it runs
>> ok.
>> Can it be that you are really running the old test ?
>> Strange things can happen if you svn update and have the file open in an
>> editor, and then save or close the editor window.
>> Just to be sure, you can do:
>> 1) close any window using files from the cocos checkout
>> 2) open a console and go to your svn checkout
>> 3) type
>> svn info
>> it says Revision: 979 ?
>> type
>> svn diff test\test_action_non_interval.py
>> It shows no modifications ?
>> --
>> claudio
>>
>
> Definitively you are running a version that is not r979, the following lines
> in your traceback tells that:
>
> File "test_action_non_interval.py", line 125, in spawn_bullet
> chase_worker = bullet.do(Chase(self.green_obj, fastness_bullet))
>
> this is the old code.
> --
> claudio
>
> --
> You received this message because you are subscribed to the Google Groups
> "cocos2d discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/cocos-discuss?hl=en.
>
Ok, so I did the following :
class Check(cocos.actions.Action):
def step(self, dt):
cell = test_layer.get_at_pixel(self.target.x, self.target.y)
if(len(cell.properties) is not 0):
if(cell.properties["block"] == True):
self._done = True
def stop(self):
print "stopped"
and i call it using the following in the sprite class:
action = JumpBy( (200,0), 300, 1, duration=3) | Check()
self.do(action)
However, although it prints "stopped" when the sprite collides with
the cell, it doesnt stop the action. It just print "stopped" 5 times
and continues with the whole jump.
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en.