CocosSharp icon indicating copy to clipboard operation
CocosSharp copied to clipboard

RunActions (CCFiniteTimeAction[]) doubles up first item

Open chamons opened this issue 9 years ago • 3 comments

Code:

        var one = new CCCallFunc (() =>
        {
            System.Diagnostics.Debug.WriteLine ("1");
        });

        var two = new CCCallFunc (() =>
        {
            System.Diagnostics.Debug.WriteLine ("2");
        });

        var three = new CCCallFunc (() =>
        {
            System.Diagnostics.Debug.WriteLine ("3");
        });

        var four = new CCCallFunc (() =>
        {
            System.Diagnostics.Debug.WriteLine ("4");
        });

        var five = new CCCallFunc (() =>
        {
            System.Diagnostics.Debug.WriteLine ("5");
        });

        this.RunActions (new CCFiniteTimeAction[] { one, two, three, four, five });

Output: 1 1 2 3 4 5

Expected: 1 2 3 4 5

chamons avatar Jan 09 '16 05:01 chamons

You can work around this by having your first action have state to ignore the first time it was called, but this can get annoying for non-call func actions.

chamons avatar Jan 09 '16 05:01 chamons

Oh, and 1.6.2.0 if that matters.

chamons avatar Jan 09 '16 05:01 chamons

Sounds similar to https://github.com/xamarin/urho/issues/88

Therzok avatar Jan 09 '16 17:01 Therzok