On Mon, Jul 5, 2010 at 9:16 PM, Richard Jones <[email protected]>wrote:

> >
> >  As it was only recently added in trunk, and never made to release, we
> don't
> > need to preserve for compatibility reasons.
>
> Yeah, I'm not sure I see a point to DoAction either.
>
>
I take it as a permission to remove, tell me if I'm wrong


>
> > 2) I want to remove actions.interval_actions.Mover
>
>

LOL! I didn't even know that was there!

 I like the idea of a standard Mover, but I don't like that

implementation, for different reasons. For what it's worth I've just
> implemented this mover:
>
> class Move(actions.Action):
>    """Move the target based on parameters on the target.
>
>    For movement the parameters are::
>
>        target.position = (x, y)
>        target.velocity = (dx, dy)
>        target.acceleration = (ddx, ddy) = (0, 0)
>        target.gravity = 0
>
> [snip]
At first I feel too tired to look at the code, but finally get along to at
least grasp the essentials.
I think that moving the controlled parameters to the node is a big good
idea, that eliminates fears of general breakage, and at first look I don't
see anything that tells 'uh,uh, that is not really an action'

If you want an user-controlled movement, in line with the usage of Mover in
test_tiles, probably it can be achieved by

adding

    target.buttons # a dict with key:value pairs as  'cmd': boolean,
1=pressed , 0= not pressed

when the ControllerLayer will translate key pressed to commands and store in
the target.

I noticed you checked-in this, and other changes.
Theres something in the other changes that breaks the unit test for actions
( before: all actions test passed, after the changes: 2 test failed)
[
running all the tests ( you need py.test , you need to set an environment
variable cocos_utest to 1 before running):
cd utest
py.test
]

Your new code really needed the changes ?

I am a bit tired, need to update text files in the top dir of trunk, update
setup py, work in the cocos2d.org upgrade.
So, if feasible i would prefer to revert the other changes instead of dig
the test to see if I need to fix the tests, the base_actions code or what.


> I think it's reasonable to lose Mover as it does pose some problems as
>
you've outlined and also I find it less useful than it could be :-)
>


Ok, I will take care. At the moment I will replace test_tiles.py by
test_tiles_b.py, but surely you will want to write it using your new classes
?


>
>
>     Richard
>
>


I will now work in the non actions parts, please see if you can change your
new code to work without the breaking changes, that I suppose are the ones
in r1009

--
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.

Reply via email to